Forum Discussion
Anonymous
5 years agoNot applicable
Combining Multiple DAX Measures - how to do it?
Hi - I have a couple of measures that I compare against each other to get another measure - I'd like to be able to put all 3 of them into one longer DAX measure, is that possible?? Is there a more el...
- 5 years ago
Anonymous Try:
WEEK 31 AVAILABILITY = VAR __WEEK31TotalProducts = CALCULATE( COUNTROWS ('Combined_GPI'), FILTER('Combined_GPI','Combined_GPI'[Week] = 31) ) VAR __WEEK31OutofStock = CALCULATE( COUNTROWS ('Combined_GPI'), FILTER('Combined_GPI','Combined_GPI'[OOS] = 1), FILTER('Combined_GPI','Combined_GPI'[Week] = 31) ) RETURN 1 - DIVIDE(('Combined_GPI'[__WEEK31OutofStock]), ('Combined_GPI'[__WEEK31TotalProducts]))
Greg_Deckler
Community Champion
5 years agoAnonymous Try:
WEEK 31 AVAILABILITY =
VAR __WEEK31TotalProducts =
CALCULATE(
COUNTROWS ('Combined_GPI'),
FILTER('Combined_GPI','Combined_GPI'[Week] = 31)
)
VAR __WEEK31OutofStock =
CALCULATE(
COUNTROWS ('Combined_GPI'),
FILTER('Combined_GPI','Combined_GPI'[OOS] = 1),
FILTER('Combined_GPI','Combined_GPI'[Week] = 31)
)
RETURN
1 - DIVIDE(('Combined_GPI'[__WEEK31OutofStock]), ('Combined_GPI'[__WEEK31TotalProducts]))Anonymous
5 years agoNot applicable
Thanks Greg_Deckler - thats super helpful! I'll do some learning on Variables 🙂