Forum Discussion
SebSchoon1
Post Patron
3 years agoRankx Not working at all
Hi guys
I have created a summarized Table
with this formula
Table = SUMMARIZE (
'Tableau Dispatch',
'Base Article'[CODE ARTICLE],
'Base Article'[TAILLE],
"taille si pas 0",VAR QTE= [2-Total articles en stock]
VAR QTEDEPOT = CALCULATE(if([2-Total articles en stock]=1,[Rank Taille],BLANK()),ALLSELECTED('Tableau Dispatch'[CODE DEPOT]))
RETURN CALCULATE(If([Rank]<>BLANK(),QTEDEPOT,BLANK()),VALUES('Tableau Dispatch'[CODE DEPOT])))
Which gime me This
Then i make a Rank measure on the value in column [taille si pas 0]
Which return me the previous index by size
from 1 to 13 since i have 13 sizes [TAILLE] on this item but only 5 with quatity =1
by the values in column [Taille si pas 0]
here is my expected value
Why is that so **bleep** harD?
Hi SebSchoon1 ,
Please try following DAX:
Rank = IF('Table'[taille] <> BLANK(),RANKX(FILTER('Table','Table'[taille] <> BLANK()),'Table'[taille],,ASC,Dense))The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-yadongf-msft
Community Support
Hi SebSchoon1 ,
Please try following DAX:
Rank = IF('Table'[taille] <> BLANK(),RANKX(FILTER('Table','Table'[taille] <> BLANK()),'Table'[taille],,ASC,Dense))The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.