Forum Discussion
DAX: Ranking Date
- 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
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
Hi v-ljerr-msft,
Thank you ! It works pretty well on Power BI Desktop.
But I have another request how can it work directly within Excel Power Pivot interface ? Because the Var function doesn't seem to work outside of Power BI Desktop interface.
Thank a lot,
Steve
- v-ljerr-msft9 years agoMicrosoft Employee
Hi stblonde,
As I am not very familiar with Excel Power Pivot, I would suggest you also go to the Power Pivot Forum for better assistance on this issue. :smileyhappy:
Regards