Forum Discussion
mohanpal
4 years agoFrequent Visitor
Create a dynamic index column based on Date Selection by user
Hi all, I want to create a dynamic index column based on whatever date user select. Look at the sample table below, 1. If the user select 2nd Jan from slicer, the index against it should ...
- 4 years ago
Hi mohanpal
In Power BI, the calculated column cannot be dynamic according to users' selection in the slicer/filter. Only measures can be dynamic. You can use the following measure.
Rank = RANKX(ALLSELECTED('Date'[Date]),CALCULATE(MAX('Date'[Date])),,ASC,Dense)Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
azaki
2 years agoFrequent Visitor
To have a dynamic index follow below steps
1- Add Index column to your data set
2- Create Measure like this
MsrDynamicIndex = SUMX(FILTER(ALLSELECTED('Table_Name'),[Index]<=MAXX('Table_Name',[Index])),CALCULATE(1))
Now the measure will be your Dynamic Index whatever filters you applied it will reset the index 🙂
kaacuesta
2 years agoNew Member
This generally works although I am wondering how this happened, see how first row is ranked 7th