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.
Hi,
I'm trying to use the result of my first calculated measure in a second measure.
1st Measure:
Median Rent =
Client Name | City | Address | Rent PSM (Selected Currency) | Median Rent | Difference |
ABC | London | 3 Baker Street | 25 | 25 | 0 |
XYZ | London | 26 Oxford Street | 40 | 40 | 0 |
CDG | London | 9 Wellington Street | 28 | 28 | 0 |
Client Name | City | Address | Rent PSM (Selected Currency) | Median Rent | Difference |
ABC | London | 3 Baker Street | 25 | 28 | -3 |
XYZ | London | 26 Oxford Street | 40 | 28 | 12 |
CDG | London | 9 Wellington Street | 28 | 28 | 0 |
Thus, greatly appreciate if anyone can suggest solutions to achieve the above desired results.
Thank you.
Solved! Go to Solution.
Hi @slackerhx
You may try below measure:
Measure = CALCULATE ( MEDIANX ( ALLSELECTED ( Table1 ), [Rent PSM (Selected Currency)] ), Table1[Total Rent (USD)] <> BLANK () )
Regards,
Cherie
Hi @slackerhx
Have you tried to add an ALL( ) to get rid of the filter on the address in the table visual? Which filters do you want to keep when calculating the median, only the one on City?
Median Rent=
CALCULATE ( MEDIANX ( 'Table 1', [Rent PSM (Selected Currency)] ), ALL ( 'Table 1'[Client Name], 'Table 1'[Address] ), 'Table 1'[Total Rent (USD)] <> BLANK () )
Hi @AlB,
I've tried using all() on the address column but it still didn't give the desired result.
I want to keep the filters for [Client Name] and [City] to recalculate the median.
Hi @slackerhx
You may refer to below measure. If it is not your case, could you share the .pbix file so that we could help further on it?You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
Median Rent = CALCULATE ( MEDIANX ( ALL ( 'Table 1' ), 'Table 1'[Rent PSM (Selected Currency)] ), 'Table 1'[Total Rent (USD)] <> BLANK () )
Regards,
Cherie
@v-cherch-msft Hi Cherie,
I've tried your method, though it managed to make median constant, however, the median is not responsive to slicers for client name and city.
I've done up a sample file to illustrate the issue. Please see attached link.
https://1drv.ms/u/s!AoVBzNM7bDanhH2XtlmnB_-zBsVR
Thank you!
Hi @slackerhx
You may try below measure:
Measure = CALCULATE ( MEDIANX ( ALLSELECTED ( Table1 ), [Rent PSM (Selected Currency)] ), Table1[Total Rent (USD)] <> BLANK () )
Regards,
Cherie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |