cancel
Showing results for 
Search instead for 
Did you mean: 

Measure Totals, The Final Word

Super User
9864 Views

Re: Measure Totals, The Final Word

AMAZING! thanks to you a lot!

tkrupka Frequent Visitor
Frequent Visitor

Re: Measure Totals, The Final Word

I'm still trying to get this, and I just cannot wrap my head around it.

 

Fix Total.JPGCan't find the correct formula to replace "2"

tkrupka Frequent Visitor
Frequent Visitor

Re: Measure Totals, The Final Word

Nevermind, 

 

This worked:

 

Trial = 
IF(ISFILTERED(GeneratorNames[GeneratorName])&&ISFILTERED(RunData[Date])&&ISFILTERED(Locations[Location])&&ISFILTERED(IBXs[IBX_Name]),
SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])),
VAR __table = SUMMARIZE(RunData,Locations[Location],IBXs[IBX_Name],GeneratorNames[GeneratorName],RunData[Date],"__value",SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])))
RETURN
IF(ISFILTERED(GeneratorNames[GeneratorName])&&ISFILTERED(RunData[Date])&&ISFILTERED(Locations[Location])&&ISFILTERED(IBXs[IBX_Name]),
SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])),SUMX(__table,[__value])))
samiller71 Visitor
Visitor

Re: Measure Totals, The Final Word

How can one apply this solution to a measure that references two additional measures, as shown below?

 

Lost Customers = IF([Total Orders]>0 && [Last Period Orders]<=0 ,1,0)
 
For your reference, below are the details of the two additional measures:
Total Orders = SUMX(RELATEDTABLE('Mfg Invoice Data-Mar'),'Mfg Invoice Data-Mar'[Quantity])
 
Last Period Orders = CALCULATE(
SUM('Mfg Invoice Data-Mar'[Quantity]),
DATESBETWEEN(
'Mfg Invoice Data-Mar'[Creation Date].[Date],
DATEADD(LASTDATE('Mfg Invoice Data-Mar'[Creation Date].[Date]),-1*[Selected Period],DAY),
LASTDATE('Mfg Invoice Data-Mar'[Creation Date].[Date])
)
)
 
 
I am trying to show a total of Lost Customers but the total is outputting "1".