Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi All,
I have a product table with ID, DATE, PRODUCT ,Count of products and index across the table.
| ID | date | Product name | count | Index |
| A001 | 1/1/2023 | Apple | 1 | 1 |
| B002 | 1/2/2023 | Samsung | 4 | 2 |
| C003 | 1/3/2023 | Apple | 5 | 3 |
| D004 | 1/4/2023 | Microsoft | 2 | 4 |
| E005 | 1/5/2023 | 3 | 5 | |
| F006 | 1/6/2023 | Apple | 6 | 6 |
How to create a dynamic index which auto assigns the series when a filter is applied. For example, product name = 'Apple'
Output :
| ID | date | Product name | count | Index |
| A001 | 1/1/2023 | Apple | 1 | 1 |
| C003 | 1/3/2023 | Apple | 5 | 2 |
| F006 | 1/6/2023 | Apple | 6 | 3 |
Appreciate for your help!
Thanks
Solved! Go to Solution.
Hi,
I assume you want to create a meausure, not a calculated column.
Please check the below picture and the attached pbix file.
I authored a measure that results the index number, and it is depending on the date and the ID column.
Please kindly correct me if the logic to create the index number is different.
Index measure: =
COUNTROWS (
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE (
ALLSELECTED ( Data ),
Data[ID],
Data[date],
Data[Product name],
Data[count]
),
ORDERBY ( Data[date], ASC, Data[ID], ASC )
)
)
Hi @KN8 ,
Here are the steps you can follow:
1. Create measure.
Measure =
RANKX(
ALLSELECTED('Table'),CALCULATE(MAX('Table'[date])),,ASC)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
I assume you want to create a meausure, not a calculated column.
Please check the below picture and the attached pbix file.
I authored a measure that results the index number, and it is depending on the date and the ID column.
Please kindly correct me if the logic to create the index number is different.
Index measure: =
COUNTROWS (
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE (
ALLSELECTED ( Data ),
Data[ID],
Data[date],
Data[Product name],
Data[count]
),
ORDERBY ( Data[date], ASC, Data[ID], ASC )
)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.