HI,
I wanted to create a number sequence with dax , so started with ;
I then used this in another measure ;
But this gave a count of the total, but when I made the [Onevalue] measure a variable it worked fine;
I did put these into DAX studio, and got in this case 14 and 0, can someone explain or point in the direction of information on how these two measure are
filtering down to different results. is you use ; IF( HASONEVALUE(Table1[Date]),VALUES(Table1[Date])) inside the second formula again it works.
Richard
I wanted to create a number sequence with dax , so started with ;
Excel Formula:
Onevalue:=IF( HASONEVALUE(Table1[Date]),VALUES(Table1[Date]))
I then used this in another measure ;
Excel Formula:
Index :=
CALCULATE (
COUNTROWS ( Table1 ),
FILTER ( ALL ( Table1 ), ISONORAFTER ( Table1[Date], [Onevalue], DESC ) )
)
But this gave a count of the total, but when I made the [Onevalue] measure a variable it worked fine;
Excel Formula:
IndexVAR :=
VAR onev = [Onevalue]
RETURN
CALCULATE(
COUNTROWS(Table1),
FILTER(ALL(Table1),ISONORAFTER(Table1[Date], onev, DESC) ))
I did put these into DAX studio, and got in this case 14 and 0, can someone explain or point in the direction of information on how these two measure are
filtering down to different results. is you use ; IF( HASONEVALUE(Table1[Date]),VALUES(Table1[Date])) inside the second formula again it works.
Richard