Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi PowerBI Masters:
I have a quetion of how to rank my data in power BI, please see the sample data below:
I
As you can see, in the same day(I have mutiple day's data), one truck may have different records created by different time. In column D I want to created a dimension, which rank the created time by truck number by deliverydate as descding. In SQL, it should be:
rank( ) over( TRUCKNUMBER,DELIVERYDATE order by DATECREATED desc) as Rank_Index
But I don;t know how to do it in PowerBi, I only need the lastest record for each truck on each day(which means rank=1), can anyone let me know how can I do it in data modeling view(DAX) or even query editor mode(power query)
Thanks
Frank
Solved! Go to Solution.
Yes, sorry typing error, I have an solution, but I am not sure if this is the best way?
anyone knows what the solution for that?
Hi
rank1 = RANKX ( ALLEXCEPT ( Sheet1, Sheet1[number] ), CALCULATE ( SELECTEDVALUE ( Sheet1[createdtime] ) ), , DESC, DENSE )
Best Regareds
Maggie
Yes, sorry typing error, I have an solution, but I am not sure if this is the best way?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |