Forum Discussion
Measure aggregated based on dimensions
Hi all!
I need to create a measure that aggregates based on dimensions, I mean, when its aggregated by the Time Dimension I need to SUM the values but when its aggregated by the Department Dimension I need to AVERAGE the values.
Thanks in advanced.
Regards
Hi, try with this Measure in Values Section
Measure = IF ( HASONEVALUE ( Table1[TIME] ); SUM ( Table1[FTE's] ); AVERAGE ( Table1[FTE's] ) )Regards
Victor
Lima - Peru
16 Replies
- Greg_DecklerCommunity Champion
So, does that represent source data, expected output, neither, both?
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- ovinascaFrequent Visitor
Sorry and thanks for the post you suggested!!!
The pìcture shows what should be the final result. We have a measure called FTE's with two dimensions, WEEK and DEPARTMENT.
I want the values of FTE's to be aggregated as SUM when working with WEEK (Time) Dimension and I want them to be aggregated as AVERAGE when working with DEPARTMENT Dimension.
Hope if helps.
Thanks!!
Regards
- ovinascaFrequent Visitor
- v-jiascu-msftMicrosoft Employee
Hi ovinasca,
Can you share a sample please? In other words, can we take the non-total values as the original data?
Best Regards,
Dale
- ovinascaFrequent Visitor
Yes it is!
The non total values are the original data and the total values should be the aggregation output depending on the dimension.
The picture shows what would be the final result
Thanks!!!