Forum Discussion
IF statement totaling issues
You need to wrap the measure you currently have in some sort of a SUMX, so it calculates each row and then sums the result instead of calculating the whole table at once.
I guess since the original formulas that the IF statement is calculating off are both wrapped in SUMX, what would you propose? I tried creating a much bigger formula by joining the two within an IF statement and had no luck.
- jahida10 years agoImpactful Individual
If I understand correctly (I may not), the objective here is to calculate at the row level in the table visual (being done correctly) and then sum those results to get a final total. If that's the case, then you need a SUMX which groups together each row of the table visual, calculates for each, and then sums. SUMMARIZE might be useful:
SUMX(SUMMARIZE(Table, Table[Col1], Table[Col2], "Value", IF(...)), [Value])
Where Col1 and Col2 are the columns of the table that represent rows in the visual.
- avalerion10 years agoFrequent Visitor
The big issue is that the values needing analysis aren't stored in any table - they're measures only since there are a few rules applied in order to figure out what the true sales for a given month are.
- jahida10 years agoImpactful Individual
What is the setup of the table? Like what defines a row? Is it a month, a product, both, etc.