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 All,
I want a dynamic DAX that can show me sequential numbers for all my records in table KPI.
The table can be filtered using slicers and so the index should change dynamically.
Solved! Go to Solution.
Hi @Anonymous ,
You can try the following measure to show the dynamic index.
RowNum =
CALCULATE (
COUNT ( 'Table'[ID] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[ID] <= MAX ( 'Table'[ID] )
)
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can try the following measure to show the dynamic index.
RowNum =
CALCULATE (
COUNT ( 'Table'[ID] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[ID] <= MAX ( 'Table'[ID] )
)
)
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , In case of Dax Index, would be Rank most of the time. Rank can column Rank static and Measure Rank Dynamic. But Measure rank to Dynamic, you can use allselected. Also, measure rank is context-sensitive
City Rank = RANKX(all(Geography[City]),[Sales]) // Work for City both with City ID all city Rank is 1
Geography Rank = RANKX(all(Geography),[Sales]) // Work with both CIty and City ID , both are the lowest level
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales])// Work with both CIty and City ID
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
@Anonymous - If you want a specific solution, paste in some sample data as text.
@Anonymous - It exists, I created it. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Mythical-DAX-Index/m-p/1093214#M528
There are also techniques using RANKX although they tend to product duplicates. There are mitigation methods using small random numbers to break ties.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |