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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
fingalbrad
Helper I
Helper I

Dynamic measure calculations using page filter

HI 

 

I have a group of notifications like this

 

Asset Model       Failure Name        Condition Rating     Total Risk   Work Centre  Notification NUmber

A                               1                             10                          5               A                          12

A                               1                              10                         7               B                           13

A                                1                             10                        8                A                           14

A                               2                               9                         5                 A                          15

A                                2                              10                      7                  A                          16

B                               3                                5                        8                 A                          17

C                               4                                6                        9                 A                          18

C                                 4                              6                       5                  A                          19

 

What I want to do is create a table that calculates the median risk for each Asset Model - Failure Name - Current Condition Rating combination. There is a slicer on the page which is Work Centre.I want this table to be able to be dynamic and change when the slicer is changed between work centre. So the table summarises all the data, but if someone chooses work centre A, then only those notifications are considered and the median is calculated for those. The hard part is, I want these combinations to be ranked. I also want this ranking to be plottable. So far I have been able to create the table by just brnging in the columns and I created a measure :

 

Median Total Risk = median('JP Outputs'[Total Risk])
 
I then created a rank measure which is:
 
Median Risk Rank = rankx(ALLSELECTED('JP Outputs'),calculate('JP Outputs'[Median Total Risk]))
 
The thing is this gives me a ranking as shown:
 
fingalbrad_3-1661841026370.png

 


It does not start at 1.  So that is my first issue. 

 

Then When I go to plot it as a scatter plot I put in these as my inputs

 

fingalbrad_1-1661840940103.png

 and I get a plot like this

 

fingalbrad_2-1661840961284.png

This is ranking every notification. But I want them ranked via the combination and the combination median risk rank

 

So In rank 1 it would be  the 2 notifications for crossarm tilted and their individual total risk outputs plotted in the y axis

in rank 2 it would be one notification for surface degraded etc

 

And I want these to dynamically change an recalculate when I change the slicers for the work centre

1 REPLY 1
Anonymous
Not applicable

Hi there,

 

I think you might need your ranking to be based on a column not a table which it appears to be. I have used rankings where I am ranking countries by spend here is my formula

If(ISINSCOPE(Countries[International Short]),If(Not ISBLANK([Dynamic Spend ($M)]),RANKX(ALLSELECTED(Countries[International Short]),Combined[Dynamic Spend ($M)])))
 
If you want to rank by the combination of your 3 columns (asset model, failure name, condition rating) I would recommend creating a column which concatenates all 3 together and then use that where I have 'Countries[International Short]'. Replace my '[Dynamic Spend ($M)]' with your Median Total Risk.
 
Hope this helps.
 
(P.S. I am just a fellow end user so apologies if my response isn't useful)

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.