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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Joshwald
Frequent Visitor

Inter quartile range of a measure with dynamic filtering

I'm trying to calculate the maximum, median and xth percentile ranges of a measure that do not change with filtering on a certain field.

 

My data looks like:

 

Development MonthsItemMeasure
1A0.1
1B0.2
1C0.15
2A0.25
2B0.3
2C0.35
3A0.4
3B0.4
3C0.55
4A0.55
4B0.5
4C0.75
5A0.7
5B0.6
5C0.95

 

With the current graphs produced being:

Joshwald_0-1670265801173.png

I want to add the following calculations on the measure:

 

Development MonthsItemMeasureMax at Development MonthMedian25th percentile75th percentile
1A0.10.20.150.1250.175
1B0.20.20.150.1250.175
1C0.150.20.150.1250.175
2A0.250.350.30.2750.325
2B0.30.350.30.2750.325
2C0.350.350.30.2750.325
3A0.40.550.40.40.475
3B0.40.550.40.40.475
3C0.550.550.40.40.475
4A0.550.750.550.5250.65
4B0.50.750.550.5250.65
4C0.750.750.550.5250.65
5A0.70.950.70.650.825
5B0.60.950.70.650.825
5C0.950.950.70.650.825

 

With the desired graph:

Joshwald_1-1670265832537.png

 

Noting the Max/MED/Xth Percentiles do not change if you filter away A, B or C.

 

Thanks

Josh

 

 

11 REPLIES 11
v-rongtiep-msft
Community Support
Community Support

Hi @Joshwald ,

Do you mean that the values on the segment graph change when the slicer is selected? In fact, the value does not change, but the interval interval of the Y axis changes with the value. 

vpollymsft_0-1670894172869.pngvpollymsft_1-1670894192511.png

You can compare the interval between two changes, or you can see if the value of C changes.

 

For current Power BI, it is impossible to custom the interval on any axis. You may vote on these ideas:

Add the axis interval in the charts 

Axis with configurable units (/Interval) 

 

 

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.

Thanks Polly

 

Not quite, the issue is with the Max/Median/percentile measures in the ToolTip of the graphs. You see the values are not correct for each interval. i.e. the Max at development month 3 is 200%. This change happens when I set measures 1-3 to the formulae used in my pbix file as opposed to the measures you created.

 

Is there a way for the Max/Median/Percentile measures to work as they did in your example but on the measures in my updates example?

 

Thanks

Josh

Hi @Joshwald ,

Can't  use the measure I created directly?

 

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.

Unfortunately not, they don't quite give the same results as the DAX in the updated measures in my dataset. Is there a way to achieve the same results as the Max/Median/Percentiles with those measures?

 

Thanks

Josh

Joshwald
Frequent Visitor

Hi there - I have reposted the excel link (which you should be able to download now)

 

Thanks

Josh

Hi @Joshwald ,

Please refer to my pbix file.

vpollymsft_0-1670463868237.png

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.

Thank you very much for your help. Unfortunately I'm still seeing the same issue.

 

I've updated your file to use the measure formulae I have in the dashboard, you can then see the Max/Medium/Percentile measures misbehaving. 

 

https://drive.google.com/file/d/1B3QfpRtV2AUnX2PIfCjGLdyyCec8iYW4/view?usp=drivesdk

Joshwald
Frequent Visitor

Thank you for the post. Unfortunately this doesn't return what I need. The median calculated is the same as the measure for A, B and C i.e. doesn't calculate the median of all A, B and C but rather of A and B and C individually.

 

I've attached a sample data set and desired graph (note this should show the points of the Max, Median, 25th and 75th percentiles at each development month, however opening in google sheets breaks the formulae. It works in Excel).

 

DataSample in Excel 

 

Hi @Joshwald ,

I cannot download the file,  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.

v-rongtiep-msft
Community Support
Community Support

Hi @Joshwald ,

I have created a simple smaple, please refer to it to see if it helps you.'

Create measures.

25th =
PERCENTILEX.INC (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Development Months] = SELECTEDVALUE ( 'Table'[Development Months] )
    ),
    [MMEASURE],
    0.25
)
75th =
PERCENTILEX.INC (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Development Months] = SELECTEDVALUE ( 'Table'[Development Months] )
    ),
    [MMEASURE],
    0.75
)
Median =
MEDIANX (
    FILTER (
        ALL ( 'Table' ),
        'Table'[Development Months] = SELECTEDVALUE ( 'Table'[Development Months] )
    ),
    [MMEASURE]
)

 The [MMEASURE] is the [Measure] in your table.

vpollymsft_0-1670291198418.pngvpollymsft_1-1670291208826.png

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.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.