Forum Discussion
stblonde
9 years agoRegular Visitor
DAX: Ranking Date
Hello everyone, I have some trouble with Power BI and I hope you will help me with. I have a list of Campaigns from Campaign 1 to 4 with the communication date in front, see below (picture 1):...
- 9 years ago
Hi stblonde,
I tried your first solution, but it showed up an Error (The column "date" cannot be found) :smileysad:You shouldn't leave the VAR Function (DAX) in your formula. The formula below is for your reference.:smileyhappy:
Rank = VAR d = Tableau1[Date] VAR c = Tableau1[Campaign ID] RETURN CALCULATE ( RANK.EQ ( d, Tableau1[Date], ASC ), FILTER ( ALL ( Tableau1 ), Tableau1[Campaign ID] = c ) )And the formula above should also meet your requirements:
Here is the sample pbix file for your reference.
Regards
Gisselbrecht
9 years agoRegular Visitor
Hello,
can you explain, how work your formula plz ? it work well for me but i don't understand how works the VAR value in CALCULATE function.
Thank you
Anonymous
8 years agoNot applicable
Rank =
Var Year = 'NDNQI Clinical Unit'[Year]
Var Qtr = 'NDNQI Clinical Unit'[Q Number]
Return
CALCULATE(
RANK.EQ(Year, 'NDNQI Clinical Unit'[Year]),
FILTER(ALL('NDNQI Clinical Unit'),'NDNQI Clinical Unit'[Q Number]=Qtr
))
Not get Rank correctly