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.
How to get Aggregate of (SUM) of Max Value, which is calculated
Lets say we have A--B in the heirarchy, The following formula is getting correct results calculated at level B, For for Level A, We are getting Max of the values as shown in the snapshot below. How to get aggregate of the measure formula shown below at level A ?
Appreciate your help
Solved! Go to Solution.
Hi @karnag ,
I updated your sample pbix file(see attachment), please check if that is what you want. Please update the formula of measure [Max of Capacity Hours average per Exp YearMonth] as below:
Max of Capacity Hours average per Exp YearMonth =
MAXX (
( VALUES ( 'Enhanced Utilization'[Exp YearMonth] ) ),
CALCULATE ( MAX ( 'Enhanced Utilization'[Capacity Hours] ) )
)
|
Best Regards
Please note the granularity of Capacity Hours is higher Vs the Util Table which is at a much lower level.
Here is a snapshot,
Please find the .pbix file at the following location. (Simplified Model)
https://drive.google.com/drive/folders/1uByte3umAH_BW-Ubkm_z-djVlI_ZyV8t?usp=sharing
Hi @karnag ,
I updated your sample pbix file(see attachment), please check if that is what you want. Please update the formula of measure [Max of Capacity Hours average per Exp YearMonth] as below:
Max of Capacity Hours average per Exp YearMonth =
MAXX (
( VALUES ( 'Enhanced Utilization'[Exp YearMonth] ) ),
CALCULATE ( MAX ( 'Enhanced Utilization'[Capacity Hours] ) )
)
|
Best Regards
Tried the inscope option, But didn't help
Thanks @v-yiruan-msft
Will try the solution provided and will get back to you. Appreciate your help
Hi @karnag ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create two measures as below:
Sum of capactity hours = SUM('Enhanced Utilization'[Capacity Hours])
Measure =
IF (
ISINSCOPE ( 'Enhanced Utilization'[Exp YearMonth] ),
MAXX ( 'Enhanced Utilization', [Sum of capactity hours] ),
[Sum of capactity hours]
)
In addition, you can refer the following links.
Use IsInScope to get the right hierarchy level in DAX
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi,
I am looking for something like the one shown below.
Hi @karnag ,
I updated your sample pbix file(see attachment) again, please check if that is what you want.
1. Update the formula of measure [Max of Capacity Hours average per Exp YearMonth] as below
Max of Capacity Hours average per Exp YearMonth =
VAR _tab =
SUMMARIZE (
'Enhanced Utilization',
'Enhanced Utilization'[Exp YearMonth],
"@maxcapacityhour", MAX ( 'Enhanced Utilization'[Capacity Hours] )
)
RETURN
SUMX ( _tab, [@maxcapacityhour] )
2. Create another new measure as below to replace the measure [Max of Capacity Hours average per Exp YearMonth] on the matrix
Measure =
SUMX (
VALUES ( 'Enhanced Utilization'[CONSULTANT_NAME] ),
[Max of Capacity Hours average per Exp YearMonth]
)
Best Regards
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 |
---|---|
109 | |
100 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
111 | |
94 | |
83 | |
77 |