The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a date column. I created an index column which starts from 1.
For example:
Items Rank
a 1
b 2
c 3
d 4
When I apply the filter- It shows:
Item Rank
b 2
c 3
But I need something like this -
Item Rank
b 1
c 2
And I need to use that Rank column as a Lookup column to find other values.
hi @Anonymous ,
By using your data I write rank function please check two Measures and I shared two outputs also.
Please watch it.
--by using ALL function Rank = RANKX(ALL('Table'),[Sum],,DESC,Skip)
-- by using ALLSELECTED function Rank = RANKX(ALLSELECTED('Table'),[Sum],,DESC,Skip)
regards,
Naveen
Thanks for your reply.
What is the sum measure?
hi @Anonymous ,
Sum = SUM(Table[Number])
regards,
Naveen
Index are the numbers here. But I get 1s in all the column. I'm using index to rank the dates. But ranking dates in my ultimate aim.
Kindly let me know what went wrong.
Thanks,
Anand!
Also the filters are not working. the Req Id is connected to the Req number.
Hi @Anonymous
try smth like this
Measure = rankx(ALLSELECTED(Tbl_Rank);CALCULATE(FIRSTNONBLANK(Tbl_Rank[Items];Tbl_Rank[Items]));;ASC)
Hi,
Thanks for your reply!
But the code did not help.
I'm getting 1 for every row in the table.
It does not sort the remaining rows on the basics of start dates after applying the filters.
Thanks
Hi @Anonymous
It's strange because it works great with any filters applied
could you show all youe data model or *.pbix?
Thanks for your reply.
How do we attach our pbix file here?