Forum Discussion
aminw0u
8 years agoFrequent Visitor
Summary Error with IF Statement
Hello, I'm having issues with an IF and/or SUMX formula. I essentially need the calculation done at every line level & then aggregated. With my first attempt using IF, the results are correct at ...
v-ljerr-msft
8 years agoMicrosoft Employee
Hi aminw0u,
According to your descriptions above, you may need to firstly summarize your data at [Generic SKU Name] level, then use SUMX to get the correct total in your scenario. The formula below is for your reference. :smileyhappy:
08.a Expired Release via Scrap =
SUMX (
SUMMARIZE (
EEORE,
EEORE[Generic SKU Name],
"abc", IF ( [01. Expired PQ] < [07. Gross Scrap], [01. Expired PQ], [07. Gross Scrap] )
* -1
),
[abc]
)
Regards
- aminw0u8 years agoFrequent Visitor
I think it makes sense to summarize, but when I do that, it gives me an answer that is even more incorrect than before unfortunately. :smileysad: The 08.3 column is the one that includes the summarize formula.
08.e Expired Release via Scrap =
SUMX (
SUMMARIZE (
EEORE,
EEORE[Generic SKU Name],
"abc", IF ( [01. Expired PQ] < [07. Gross Scrap], [01. Expired PQ], [07. Gross Scrap] )
* -1
),
[abc]
)