Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello mates!
I have one doubt.
I have this Excel:
So, I want to know if I don't have consecutive numbers.
Something like, if row number is row number - last row number = 1, it's ok. If it's 2, we have a not consecutive number.
Numbers are examples, I could have some message like "Not consecutive!" or something like that.
Is there any way to do this?
Just cheking if column has consecutive numbers and knowing where is the "jump".
Thank you so much! 🙂
Solved! Go to Solution.
@JaviF Correct, so you would substitute your consequetive number column for the date column. So, like the following:
Column =
VAR __Current = [ConsequetiveNumberColumn]
VAR __Previous = MAXX(FILTER('Table','Table'[ConsequetiveNumberColumn] < EARLIER('Table'[ConsequetiveNumberColumn])),[ConsequetiveNumberColumn])
RETURN
__Current - __Previous
@JaviF See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
Hi @Greg_Deckler 🙂
Thanks for your answer.
I don't have any Date column... Just the "consecutive" numbers.
How could I adapt the DAX to my problem?
Thanks again!
@JaviF Correct, so you would substitute your consequetive number column for the date column. So, like the following:
Column =
VAR __Current = [ConsequetiveNumberColumn]
VAR __Previous = MAXX(FILTER('Table','Table'[ConsequetiveNumberColumn] < EARLIER('Table'[ConsequetiveNumberColumn])),[ConsequetiveNumberColumn])
RETURN
__Current - __Previous
Oops, I tried again.
That worked!!! 😄
Thanks mate 🙂
Thanks @Greg_Deckler 🙂
It seems that didn't work:
Var current and EARLIER don't work 😞
First one, the var says that 'Cannot find name' and it exists 100%.
The other one, 'Parameter is not the correct type'.
Any idea to solve these?
Thanks! 😄
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
5 |
User | Count |
---|---|
13 | |
12 | |
11 | |
9 | |
9 |