LEAD Function in MDX

3738
26679
LEAD Function
LEAD Function

Friends,

If you have read the article about LAG then you will easily say that LEAD is just opposite to LAG function after finished reading this article.LEAD is a Navigation Function which returns a value(member) that is N number of positions following the supplied member in the given attribute. Typical uses of this function is to navigate back or forward to N positions from the given member. PFB the syntax of LEAD function –

Member_Expression.Lead(Index)
Member_Expression - A valid Attribute Member .
Index - The number of positions we wish to navigate.

Member positions within a level are determined by the attribute hierarchy’s natural order. The numbering of the positions is zero-based. If the specified lead is zero (0), the Lead function returns the specified member. If you specified 1(One) then it will take you forward by one Member, if 2(Two) then will navigate forward by two members from the current member.

Positive Lead and Negative Lead –

If you specify a POSITIVE number as Index then it will go forward from the current member and this is called POSITIVE LEAD. Lets see an example for Positive Lead here.

Select [Date].[Fiscal].[Month].[January 2001].Lead(5) on 0

from [Adventure Works].

If you see the above query member expression is “[Date].[Fiscal].[Month].[January 2001]” and current member is “January 2001”. We have given LEAD(5) and hence it will navigate forward by FIVE members and will return “June 2001” as output if that member exists in Cube.

If you specify a NEGATIVE number as Index then it will go back from the current member and this is called NEGATIVE LEAD. Lets see an example for Negative Lead here.

Select [Date].[Fiscal].[Month].[January 2001].LEAD(-5) on 0

from [Adventure Works].

If you see the above query member expression is “[Date].[Fiscal].[Month].[January 2001]” and current member is “January 2001”. We have given LEAD(-5) and hence it will navigate back by FIVE members and will return “August 2000” as output if that member exists in Cube.

PFB screenshot which shows an example for Lead function.
LEAD Function
LEAD Function

Note – Lead looks like a simple function and not much useful one in real time scenarios but this function in combination with other functions like CLOSING PERIOD or RANGE functions will be most powerful and useful one.

Remember – Positive Lead = Negative Lag and Negative Lead = Positive Lag.

That’s it  .. Happy Coding !!

Regards,

Roopesh Babu V


3738 COMMENTS

  1. SLOTJOINT CASINO gives 100 free spins no deposit on Book of Dead to all new players that sign up with our links The Bank of Canada announced Wednesday it would hold its key overnight rate at 4.5 per cent after eight consecutive interest rate increases – and experts said the pause could last throughout 2023 as the bank watches the economy responds to its policy moves so far. IZZI Casino50 Free Spins No Deposit This bonus is only valid for all new players signing up with our links We have mentioned and identified some top free spins bonuses. But it is important to know what they are and why they are offered by online casinos. Free spins bonuses are promotions that offer players free shots at a slot jackpot. This does not require a financial commitment as a wager. They are often offered by casinos to get new players to register or deposit with them. They are also used to promote new games.
    http://xn--om3bn4fo9du3atid.kr/bbs/board.php?bo_table=free&wr_id=19713
    No matter what online casino game you enjoy, we have something for you. At SlotsLV, it’s crucial to be able to meet the expectations of every type of player that likes online casinos. This is why we have put a lot of effort into make our games selection diverse enough. Along with the amazing selection of slot machines, Slots.LV has also included other types of casino games that are also extremely popular and preferred by those who want to wager funds and stick to the gambling network online. If you think places such as Vegas are immune to it, think again.  For one thing, right in Downtown Vegas, two well-known Slot Boxes are La Bayou and Mermaids.  These locations are popular for having a unique theme, unique snacks and drinks, as well as a total party atmosphere.  It’s true that these two, “Casinos,” thrive because of the Fremont Street Experience traffic (and I’d be lying if I said I never played at them) but even outside of these high traffic zones, there is the Dotty’s chain which is a thriving enterprise closely comparable to West Virginia’s parlors.  They are also a huge thorn in the side of Station Casinos.

  2. dapoxetine generic in india [url=https://dapoxetinepriligy.foundation/]dapoxetine online purchase india[/url] buy cheap priligy online

  3. I’m tired of websites advertising ‘cheap’ [url=http://esynthroid.com/]generic Synthroid online[/url], only to scam you out of your money.

  4. Men who struggle with maintaining an erection should consider [url=https://tadalafil.foundation/]tadalafil tablets 40mg[/url] as an option.

  5. Stylist Color Pro — это блестящий салонный уровень окрашивания в домашних условиях! ТД АзимутТрейд компания по продаже сырья для производства полимерных изделий (специализация: купить азофоску, купить едкий… Отзывы о Kerastase Маска Resistance Extentioniste для усиления прочности волос в процессе их роста 8 (499) 734-17-59 Сильное средство против старения. Стимулирует обновление клеток. Увлажняет кожу, обеспечивая эластичность. Легкая эмульсия. Отзывы о ChocoLatte Масло-бальзам для волос ФОРМУЛА №3 для сухих ломких и поврежденных волос Приобрела для мамы Нано Ботокс, и не столько для лица, сколько для области шеи и декольте, ведь именно эти зоны выдают истинный возраст женщины. Конечно, мама использует эту сыворотку и для лица тоже, но реже, т.к. кожа лица у неё была более гладкая. Ну, а теперь, благодаря Нано Ботокс, и шея, и грудь стали «соответствовать» гладкому лицу. Сыворотка реально работает!
    http://farmtable.kr/bbs/board.php?bo_table=free&wr_id=16420
    Судя по отзывам о наращивании ресниц, прием витаминов А и Е ускоряет процесс восстановления. Их можно принимать в виде таблеток или добавлять в масляные комплексы для наружного использования. Через сколько восстанавливаются ресницы после наращивания, если каждый вечер смазывать ресничный край соком алоэ? Отзывы сообщают, что среднее время полного восстановления выпавших ресниц – около трех недель. Ускорить процесс помогают только специальные средства для восстановления ресниц после наращивания, ламинирования, окрашивания. Девушки всегда стремятся преобразиться. Мы наращиваем волосы, ногти и ресницы, делаем татуаж и всевозможные косметологические процедуры, которые зачастую могут обернуться для нас не самыми приятными последствиями. В частности предлагаем рассмотреть, как восстановить ресницы после наращивания в домашних условиях. Наконец, грубое снятие ресниц своими силами наносит серьезный ущерб, особенно если речь о применении ножниц, попытках выдергивать волокно. В ситуациях, когда нет другого выбора, и клиенту приходится снимать ресницы дома, выручает кремовый ремувер Enigma Home Care. Препарат разработан специально для экстренных случаев, когда попасть на снятие к мастеру не удается.

  6. how much is amitriptyline [url=http://amitriptyline.ink/]amitriptyline 100 mg tablet price[/url] buy amitriptyline online uk

  7. De klassieke gokkasten zoals de Simply Wild uit het cafe, de kroeg en de speelhal vind je nu gewoon online. Wellicht weet je nog goed hoe je de slots kunt spelen of wil je daar weer even op oefenen. We maken het je graag gemakkelijk om online de ware klassiekers te spelen. Je vindt hier de leukste fruitautomaten en speelautomaten, die je net als poker en roulette ook gewoon gratis kunt oefenen. Zodra je de spellen weer goed onder de knie hebt kun je een storting doen en de slots om geld spelen. Hier op Casino777.nl zijn we er trots op de beste casinospellen aan te bieden die er zijn. Bij ons vind je enorm veel online spellen zoals online gokkasten en zowel virtuele als live versies van klassieke tafelspellen als blackjack, roulette en baccarat zoals je ze nog nooit gezien hebt. Mis ook de spannende promoties, bonussen en gratis spins niet waarvan je als speler in ons casino, soms zelfs gratis, profiteert. Kortom, wij bieden de ultieme online casino ervaring van Nederland!
    https://wifidb.science/wiki/Holland_casino_on
    Andere verblijven buiten dit KingsHotel kosten je vanaf € 90,00 p.p.p.n. Althans van de organisatie van Kings. Home – Poker Kennisbank – Poker Events – Dutch Classics Rozvadov Win and Become the Governor of Poker Het Kings Resort / Casino in Rozvadov is in de afgelopen jaren uitgegroeid tot het Walhalla van de Europese pokerscene. Meerdere leden van Team Pokeren.nl waren eind januari 2018 voor de eerste keer in het Tsjechische dorpje aanwezig voor de Dutch Classics. In de jaren daarna zijn we nog vaak maar het King’s Resort teruggekeerd, voor onder andere de Benelux Classics, die in 2020 voor de eerste keer werd gehouden. Op basis van onze bevindingen hebben we de onderstaande review geschreven. Win and Become the Governor of Poker De wooneenheden in dit hotel zijn voorzien van een mini koelkast bar, een persoonlijk kluisje en een vlakscherm TV met satellietkanalen. De units hebben een minibar voor self-catering, samen met een TV voor entertainment.

  8. Kasyno jest całkowicie dostosowane do urządzeń przenośnych, na aplikację Vulkan Vegas, więc nie powinno być żadnych problemów z wykorzystaniem kodu bonusowego. Kody Vulkan Vegas są łatwe do uzyskania, ale czasami wymaga od nas odrobiny wysiłku i poszukiwań. W zależności od kasyna, bonusy w postaci kodów promocyjnych mogą być dostępne w różnych miejscach i formach. Jednak nie ma powodu do zmartwień – właśnie dlatego powstała strona, na której zebraliśmy wszystkie oferty na kod promocyjny Vulkan Vegas 2023. Betinia nie wymaga wielkiej znajomości branży kasynowej. Wystarczy 45 zł, by dołączyć do gry. Kasyno jest dostępne w polskiej wersji językowej. W Wulkan Kasyno gra online jest całkiem wygodna. Dobre bonusy, biblioteka gier dość oryginalna. Możesz wybrać odpowiednią rozrywkę, dobrze się bawić. Szkoda, że nie udało nam się zdobyć 888 zł. Promocja szybko się skończyła. Wypłata wygranych szybka.
    http://korea-shipping.co.kr/bbs/board.php?bo_table=free&wr_id=37033
    Poker to inaczej mówiąc strit w kolorze. Składa się on z pięciu następujących po sobie kart jednego koloru. Wyróżnić możemy pokera królewskiego, który jest najwyższym możliwym stritem w kolorze. Jest to jednocześnie najrzadziej występujący w pokerze układ. Karta zapewniająca uzyskanie wygrywającego układu. Zazwyczaj terminu tego używa się w liczbie mnogiej. Przykład: „Każdy pik daje mi kolor, więc mam dziewięć outów”. Poniżej można znaleźć wszystkie potrzebne informacje, aby zacząć swoją przygodę z Texas Hold’em, najpopularniejszą odmianą pokera na świecie. Początkujący gracze muszą pamiętać, że w każdym kraju sytuacja pokera może być trochę inna i nie zawsze to, co jest legalne w jednym państwie, jest dozwolone w drugim. W Polsce sytuacja pokera jest od pewnego czasu dość ustabilizowana. Zasady poker nie są w żadnym wypadku zmieniane, gracze mają dostęp do każdego wariantu pokera.

  9. Giris etmek ucun istifadeci adinizi ve sifrenizi daxil ederek hesabiniza daxil olmalisiniz. Pin-Up kazino, tehlukesiz bir oyun muhiti temin edir ve oyuncularin sexsi ve maliyye melumatlarini qoruyur.

    [url=http://tikera.ir/2023/03/26/pin-up-qazancini-nece-xerclemek-olar/]tikera.ir[/url]

  10. over the counter erectile dysfunction pills [url=http://cheapestedpills.com/#]ed meds online without doctor prescription[/url] ed pills online

  11. where can i get cheap mobic pills [url=https://mobic.store/#]where can i buy mobic tablets[/url] where buy cheap mobic without rx

  12. where to buy amoxicillin 500mg: [url=http://amoxicillins.com/#]amoxicillin cost australia[/url] buy amoxicillin online mexico

  13. To announce verified news, dog these tips:

    Look for credible sources: https://apexlifestyle.co.uk/statamic/bundles/pags/?news-brought-by-balthasar-to-romeo.html. It’s material to guard that the expos‚ outset you are reading is worthy and unbiased. Some examples of reputable sources categorize BBC, Reuters, and The Fashionable York Times. Announce multiple sources to get back at a well-rounded view of a particular info event. This can improve you listen to a more ended facsimile and keep bias. Be cognizant of the position the article is coming from, as constant respected report sources can have bias. Fact-check the low-down with another source if a news article seems too lurid or unbelievable. Till the end of time make unshakeable you are reading a fashionable article, as news can change quickly.

    Close to following these tips, you can evolve into a more au fait news reader and better know the beget around you.

  14. To understand actual scoop, ape these tips:

    Look fitted credible sources: https://class99.us/wp-content/pgs/?jennifer-stacy-s-mysterious-disappearance-on-wink.html. It’s eminent to safeguard that the report source you are reading is reliable and unbiased. Some examples of reputable sources categorize BBC, Reuters, and The Fashionable York Times. Interpret multiple sources to stimulate a well-rounded aspect of a precisely statement event. This can help you carp a more complete paint and keep bias. Be aware of the angle the article is coming from, as even good news sources can compel ought to bias. Fact-check the low-down with another fountain-head if a news article seems too sensational or unbelievable. Always be inevitable you are reading a advised article, as news can change quickly.

    By means of following these tips, you can fit a more informed scandal reader and more wisely be aware the world everywhere you.

  15. Totally! Conclusion expos‚ portals in the UK can be awesome, but there are many resources accessible to cure you espy the best the same as you. As I mentioned before, conducting an online search an eye to https://astraseal.co.uk/wp-content/art/how-old-is-jesse-watters-from-fox-news.html “UK news websites” or “British intelligence portals” is a great starting point. Not but will this hand out you a encyclopaedic slate of communication websites, but it determination also lend you with a punter understanding of the current story scene in the UK.
    Once you secure a itemize of embryonic rumour portals, it’s critical to evaluate each one to shape which best suits your preferences. As an example, BBC Advice is known in place of its ambition reporting of news stories, while The Keeper is known for its in-depth analysis of partisan and group issues. The Independent is known pro its investigative journalism, while The Times is known by reason of its work and investment capital coverage. By arrangement these differences, you can select the news portal that caters to your interests and provides you with the hearsay you call for to read.
    Additionally, it’s worth all in all neighbourhood expos‚ portals because fixed regions within the UK. These portals provide coverage of events and scoop stories that are relevant to the область, which can be firstly helpful if you’re looking to keep up with events in your local community. In behalf of instance, shire dope portals in London contain the Evening Paradigm and the Londonist, while Manchester Evening News and Liverpool Reflection are popular in the North West.
    Inclusive, there are tons statement portals readily obtainable in the UK, and it’s high-ranking to do your digging to remark the joined that suits your needs. By means of evaluating the different news programme portals based on their coverage, luxury, and editorial perspective, you can judge the one that provides you with the most relevant and captivating news stories. Good destiny with your search, and I hope this information helps you find the practised news broadcast portal suitable you!

  16. Altogether! Conclusion news portals in the UK can be crushing, but there are tons resources ready to cure you think the best one for the sake of you. As I mentioned already, conducting an online search an eye to https://ukcervicalcancer.org.uk/articles/how-much-do-news-producers-make.html “UK hot item websites” or “British information portals” is a vast starting point. Not but desire this give you a comprehensive slate of news websites, but it intention also provide you with a better brainpower of the coeval story landscape in the UK.
    On one occasion you obtain a list of embryonic account portals, it’s powerful to evaluate each anyone to choose which richest suits your preferences. As an benchmark, BBC News is known in place of its objective reporting of information stories, while The Guardian is known quest of its in-depth analysis of governmental and group issues. The Unconnected is known representing its investigative journalism, while The Times is known by reason of its work and investment capital coverage. Not later than arrangement these differences, you can select the information portal that caters to your interests and provides you with the news you hope for to read.
    Additionally, it’s quality all in all local news portals with a view specific regions within the UK. These portals lay down coverage of events and good copy stories that are akin to the area, which can be exceptionally cooperative if you’re looking to safeguard up with events in your neighbourhood pub community. In place of event, shire news portals in London number the Evening Paradigm and the Londonist, while Manchester Evening Scuttlebutt and Liverpool Echo are popular in the North West.
    Blanket, there are many news portals readily obtainable in the UK, and it’s significant to do your experimentation to unearth the joined that suits your needs. At near evaluating the contrasting news portals based on their coverage, style, and essay angle, you can select the one that provides you with the most fitting and engrossing despatch stories. Decorous destiny with your search, and I anticipation this information helps you reveal the perfect news broadcast portal inasmuch as you!

  17. I couldn’t believe my luck one night when I decided to test my luck with an online casino game. As a South African, I never considered it seriously, but that evening, fortune graced me. With a few careful bets and a dash of winning, I hit the jackpot, bagging a significant cash prize. It was a turning point in my life that allowed me to pursue my dreams and provide a better future for my family.
    https://stlucia-safari-lodge.co.za/review/casino/planet-7-casino-no-deposit-bonus.html

  18. Enjoy greater precision and versatility in managing short-term bitcoin exposure throughout the week with Bitcoin Monday through Friday weekly options. Crypto alert tools are beneficial in alerting you about important price changes by tracking live crypto market prices. Deliver interactive learning experiences. Deliver engaging global realtime experiences. Bitcoin price moved down by -0.98% in 24h. Bitcoin last traded price is Rs 24,61,587 The Bitcoin network is essentially a ledger containing a record of all Bitcoin transactions made since 2009, the network launch. There are thousands of nodes, which anyone can operate anonymously. Nobody owns or controls the Bitcoin network, and updates to the software are accepted by community consensus. Check out: Personal Finance Insider’s picks for best cryptocurrency exchanges
    https://jaredxsnj713483.humor-blog.com/22752596/manual-article-review-is-required-for-this-article
    Know where your crypto is at all times. Approved addresses is another enhanced security feature that allows you to ban or limit all cryptocurrency withdrawals to a list of known addresses only. Device based hardware biometrics FIDO-certified authentication is the strongest way to secure interactions. If you are interested in being involved, please join our Discord server where most of the discussion will take place. We especially welcome implementers who already have users relying on similar workflows, authors of related EIPs, and wallet vendors who would like to do more to support user-owned identities. User-friendly interface FIDO-certified authentication is the strongest way to secure interactions. Gemini Clearing® Gemini Clearing® Many forward-looking web services such as OpenSea and Gitcoin already allow users to establish sessions with their Ethereum wallets, achieving low friction and passwordless authentication all at once. By standardizing this workflow, millions of Ethereum users will be able to use a digital identity that they fully control to seamlessly access the web.

  19. online canadian pharmacy legit [url=https://internationalpharmacy.icu/#]canada drugs on line[/url] mexican pharmacy online review

  20. [url=http://metformin.monster/]Metformin 1000 mg pill[/url] may pass into breast milk, so consult with your doctor before breastfeeding while taking this medication.

  21. Anna Berezina is a famed framer and keynoter in the area of psychology. With a background in clinical feelings and voluminous probing experience, Anna has dedicated her employment to armistice lenient behavior and unbalanced health: https://www.pearltrees.com/mappotato10/item541337079. Through her achievement, she has мейд significant contributions to the field and has become a respected contemplating leader.

    Anna’s skill spans a number of areas of psychology, including cognitive psychology, positive non compos mentis, and emotional intelligence. Her voluminous knowledge in these domains allows her to victual valuable insights and strategies exchange for individuals seeking offensive proliferation and well-being.

    As an originator, Anna has written some controlling books that bear garnered widespread notice and praise. Her books tender practical par‘nesis and evidence-based approaches to remedy individuals clear the way fulfilling lives and evolve resilient mindsets. Via combining her clinical judgement with her passion quest of helping others, Anna’s writings secure resonated with readers roughly the world.

  22. Pharmacie en ligne pas cher [url=http://pharmacieenligne.icu/#]Acheter mГ©dicaments sans ordonnance sur internet[/url] Pharmacie en ligne pas cher