Does the attached cover this condition, comparing the change in sum(Sales) with the change in avg(Discount) in Superstore data ?
I created the Difference quick table calculations and then dragged them to the data pane as new calculated fields.
I also left the 2 'both' conditions as separate results for now.
IF [Sales Change] > 0 AND [Discount Change] > 0
ELSEIF [Sales Change] < 0 AND [Discount Change] < 0
1 of 1 people found this helpful
Its always nice to attache sample data.
I have taken below example from superstore:
You can try below approach
1. previous profit = LOOKUP(sum([Profit]),-1)
2. previous sales = LOOKUP(sum([Sales]),-1)
3. Flag =
if (SUM([Sales])-[previous sales]) > 0 AND (sum([Profit])-[previous profit])> 0 THEN 'TRUE'
ELSEif (SUM([Sales])-[previous sales]) < 0 AND (SUM([Profit])-[previous profit])< 0 THEN 'FALSE'
ELSE 'FALSE' END
This methodology worked perfectly. Thank you.
Happy to know that it helped you .