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

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.

Reply
ferzfeld
Advocate II
Advocate II

Calculate an index column measure with DAX based on an existing index column

Hello Power BI experts 🙂

 

This might be another easy DAX solution for you, but I'm struggling with it.

 

I have a fact table with test results from a test station that I want to visualize. For the X-Axis I can't use the test execution date/time, because these are not unique and I don't want test results to aggregate. That's why I added an index column in the data source and use that index as the X-Axis. 

This index will lead to gaps in the graphical presentation though, because if the user is filtering the data the index will have gaps (see screenshot). Therefore I would need a DAX Measure that will create a dynamic INDEX based on the filter context.

As a result, I would see all the test results next to each other independent of the selected filter criteria.

 

Whenever I tried something with the RANKX, it just ended up in high CPU utilization and nothing happening (so my formula must be wrong).

 

Any help would be appreciated 🙂 

 

ferzfeld_0-1618474589637.png

 

Thanks guys 🙂 

3 REPLIES 3
amitchandak
Super User
Super User

Hi @amitchandak ,

thats exactly what I did to get a static index column - but depending on the filter settings this index will lead to gaps in the visualizations as you can see here:

 

ferzfeld_0-1618486806475.png

 

 

I need an index that is dynamic (DAX measure) that I can use for the axis (if that is even possible?) 

basically i need to visualize the data each occurence as a data point, the time is not really important here. 

@ferzfeld , Based on what I have got so far.

In that case, you have to create a rank measure and an independent series table and join them in a measure 

Something very similar to segmentation. But you need = join 

https://youtu.be/CuczXPj0N-k

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.