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.
Hello Community!,
I want to create a dynamic Index as a measure or a calculated column, so that I can see the number of rows according to the filtered data based on 'Region' or 'State'.
I have the date like:
I have tried creating an index column from the Power Query but when I filter out the data according to the region, it doesn't shows the new Index from 1 to the number of rows, it shows the index value of that particular Customer name,
For eg:
What I want is to show the Index value from 1 according to the filtered.
I would really appreciate your help a lot.
Thanks & Regards,
Abhinav
Hi @abhinav_003 ,
Please have a try.
Create a measure.
Measure = VAR _REGION=RANKX(FILTER(ALL('Table'),'Table'[Region]=SELECTEDVALUE('Table'[Region])),CALCULATE(MAX('Table'[Index])),,ASC,Skip)
VAR _OTHER=RANKX(FILTER(ALL('Table'),'Table'[OTHER]=SELECTEDVALUE('Table'[OTHER])),CALCULATE(MAX('Table'[Index])),,ASC,Skip)
VAR _ER=IF(SELECTEDVALUE('Table (2)'[Column1])="OTHER",_OTHER,IF(SELECTEDVALUE('Table (2)'[Column1])="Region",_REGION,IF(SELECTEDVALUE('Table (2)'[Column1])=BLANK(),_REGION)))
RETURN _ER
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@abhinav_003 , You can create a rank column
For Rank Refer to these links
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
Column Rank: https://www.youtube.com/watch?v=wDS_Vi4r9I4&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=39
Hey @amitchandak thanks for your reply,
I tried 'Rankx' function but it is ranking all of them the same (1), I have attached the output as well as the formula of the same, please tell me where did I make the mistake.
Thanks & Regards,
Abhinav.
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 |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |