Forum Discussion
cottrera
Post Prodigy
6 years agoDAX SUM based on multiple criteria
Hi I have a table called Activity which contains activity types and time associated. I need to perform a sum based on 7 of these activity types Table_Activity Activity Time_Mins H...
- Anonymous6 years ago
You can use the following measure for this:
Measure = CALCULATE ( SUM ( 'Table'[Time_Mins] ); 'Table'[Activity] <> "WORKING" && 'Table'[Activity] <> "COLLECTION" )Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily. - Anonymous6 years ago
cottrera -
You could also add a Calculated Column to differentiate different groupings:
Category = IF( 'Table'[Activity] IN {"HOLIDAY","SICK","BANK_HOL","DOCTORS","TRAINING","DEPOT"}, "In", "Out" )Whether you use a grouping or not, you'll probably want to use a Slicer visualization:
I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Anonymous
6 years agoNot applicable
You can use the following measure for this:
Measure =
CALCULATE (
SUM ( 'Table'[Time_Mins] );
'Table'[Activity] <> "WORKING"
&& 'Table'[Activity] <> "COLLECTION"
)
Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
cottrera
Post Prodigy
6 years agoWorks fine thanks you your quick response