Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
masmith004
Regular Visitor

Dynamic Index Measure

Hello,

 

I am struggling with the idea of making a dynamic index measure using DAX in Power BI that would depend on multiple filters. For example, I have data that looks like this:

masmith004_1-1656435249619.png

 

If I filtered this data to show Facility C, with Color = Green and Material = Cotton, I would like to have an index that looked like this:

masmith004_2-1656435280087.png

Similarly, if I filtered the data to show Facility A and Color = Blue and Red, I would like to have an index that looked like this:

masmith004_3-1656435370894.png

Is this possible? Thanks in advance

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly.

I think it is better to know the sort order of each column, otherwise I suggest having a number column like the attached pbix file, and use RANKX function and ALLSELECTED function to create a index measure like below.

 

Untitled.png

 

Index measure: = 
IF (
    HASONEVALUE ( Data[Number] ),
    RANKX ( ALLSELECTED ( Data ), CALCULATE ( SUM ( Data[Number] ) ),, ASC )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly.

I think it is better to know the sort order of each column, otherwise I suggest having a number column like the attached pbix file, and use RANKX function and ALLSELECTED function to create a index measure like below.

 

Untitled.png

 

Index measure: = 
IF (
    HASONEVALUE ( Data[Number] ),
    RANKX ( ALLSELECTED ( Data ), CALCULATE ( SUM ( Data[Number] ) ),, ASC )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Thank you, this is what I needed!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.