Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi
I'm trying to rank the dates for each ProdId Using RankX, but i'm not sure how to do this, when the table is a variable...
Normally you would just specify the subcategory in the 1.st input of RankX, But it seems you can't specify colulmns of variable table..
NB. This needs to be done in one big DAX function
Hi @Anonymous ,
I create a calculated column based on the variable table you can have a try.
Final table =
var c = SELECTCOLUMNS(FILTER('Calendar',WEEKDAY('Calendar'[Date],2)<=5),"Date",'Calendar'[Date])
var MT = GENERATE(Table1,FILTER(c,[Date] <= Table1[Enddate]))
return
MT
Date Rank = RANKX(FILTER('Final table','Final table'[Prodid] = EARLIER('Final table'[Prodid])),'Final table'[Date],,DESC,Dense)Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 39 | |
| 35 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 73 | |
| 73 | |
| 38 | |
| 35 | |
| 26 |