Forum Discussion
vmurali1
3 years agoFrequent Visitor
Requesting help with Dax Calculation
Team, I have matrix that looks like this (See image 1): In the rows we have the service name. In the columns we have locations, and the value field is "Product Cost per Case" (Here is how...
Greg_Deckler
3 years agoCommunity Champion
vmurali1 Maybe:
Opportunity Cost =
VAR __Service = MAX('Table'[Service name])
VAR __Total = SUMX(FILTER(ALL('Table'),[Service name] = __Service),[Item price])
VAR __LocationTotal = SUM('Table'[Item price])
VAR __Result = (__Total - __LocationTotal) * 1
RETURN
__Result- vmurali13 years agoFrequent Visitor
Hey,
Thank you for your response. It did not work. The "*1" is nothing but the # of cases so, i went ahead and replaced that with the # of cases measure that i already have and it still shows error.