Forum Discussion
RichardT_78
3 years agoHelper I
adding row values
How do you calculate the last 3 row values into a messure? E,g value New Messure 10 31 11 30 10 22 9 16 3 7 4 ...
HotChilli
3 years agoCommunity Champion
Test it separately.
The FILTER statement creates a table so Hit New Table in powerbi and paste in that part of the statement. You can use a variable instead of SELECTEDVALUE ( 'Events'[End Date/Time]) - hardcode the value to be a datetime you have in the table.
You can then see what that part of the code does.
RichardT_78
3 years agoHelper I
Thank you,
Yes i can see that beacuse the date and time stamp are identical they are both assinged the same value so i need to order the data. this is a problem to other data in the set.
My code works for this small example but only because of the unique index
I used this code to order the data that was filtered
index_move = RANKX(ALLSELECTED(CIN_Table),CALCULATE(SUM(CIN_Table[End Date/Time])),,ASC,Dense)
But it then looks like this:
So i would need to either differenate the 1,1,2,2 to 1,2,3,4 or another option to count in groups of 4 ?