Forum Discussion
Missing numbers
Hi,
Question..
In a table is column with numbers, I want to know which numbers are missing. Can anyone help me how to find the missing numbers. Thanks!
- Anonymous4 years ago
Hi Moniek ,
Sure. Just use the current row minus the previous row:
Increasing number = var _preRow= CALCULATE(MAX('Table'[Number]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)) return MAX('Table'[Number])- _preRowBest Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Yeeaaaaah have a nice day!!!!
6 Replies
- amitchandakSuper User
Moniek , Create a new table like
Except(generateseries(Min(Table[Number]), Max(Table[Number])), values(Table[Number]))
- MoniekResolver I
Yeeaaaaah have a nice day!!!!
- MoniekResolver I
amitchandak thanks, for sure that is a solution for a lot of another issues. But in this case I want to know of the next number increase with 1 is and I want to generate a list of numbers do not increase with 1. Is that possible?
- AnonymousNot applicable
Hi Moniek ,
Based on this——I want to know of the next number increase with 1 is
You may firstly add a Index column:
Then create a measure to know if increasing with 1:
If Increasing 1 = var _preRow= CALCULATE(MAX('Table'[Number]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)) return IF( MAX('Table'[Number])-1=_preRow,"Yes","No")Output:
And for this——and I want to generate a list of numbers do not increase with 1
The definition of the third parameter for GENERATESERIES() is the increment value of the sequence. When not provided, the default value is 1. So you could custom the value:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- MoniekResolver I
Anonymous Thanks a lot!!! And if you want to see the number of increasing instead yes or no, is that possible?
- AnonymousNot applicable
Hi Moniek ,
Sure. Just use the current row minus the previous row:
Increasing number = var _preRow= CALCULATE(MAX('Table'[Number]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)) return MAX('Table'[Number])- _preRowBest Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.