Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to make the expression below perform these calculations
Sum the [Costs] of the [Soup Brand] field containing ‘Whole Foods’
-
Sum the [Costs] of the [Soup Brand] field containing ‘Nissin Cup Noodles’, ‘Health Valley’, and ‘Healthy Choice’
-
Sum the [Costs] of the [Soup Brand] field containing ‘Campbells’ and ‘Progresso’
Here is what I have come up with but I need help
Sum({1<[ Soup Brand]={'Whole Foods '}> -
1<[ Soup Brand]={'Nissin Cup Noodles '}> + 1<[ Soup Brand]={'Health Valley '}> + 1<[ Soup Brand]={'Healthy Choice '}> -
1<[ Soup Brand]={'Campbells '}> + 1<[ Soup Brand]={' Progresso '}>
} [Cost])
Try this:
=Sum({<[Soup Brand]={'Whole Foods'}>}[Cost])
-Sum({<[Soup Brand]={'Health Valley','Healthy Choice','Nissin Cup Noodles'}>}[Cost])
-Sum({<[Soup Brand] ={'Progresso','Campbells'}>}[Cost])
Thanks
Try this:
=(Sum({<[Soup Brand]={'Whole Foods'}>}[Cost])-Sum({<[Soup Brand]={'Nissin Cup Noodles'}>}[Cost])
+Sum({<[Soup Brand]={'Health Valley','Healthy Choice'}>} [Cost])
-Sum({<[Soup Brand]={'Campbells'}>}[Cost])+ Sum({<[Soup Brand]={'Progresso'}>}[Cost]))
Regards
Mohammmed Mustaq
Hi,
Instead of writing three different expressions of Soup brands you can club it in one single expression right.
1<[ Soup Brand]={'Nissin Cup Noodles ', 'Health Valley ', 'Healthy Choice '}>
Thanks,
Shetty
I hope i understand your requirement.
With Your Set Analysis Expression:
=(Sum({<[ Soup Brand]={'Whole Foods','Health Valley','Healthy Choice','Progresso'}>} [Cost])
-Sum({<[ Soup Brand]={'Nissin Cup Noodles','Campbells'}>} [Cost]))
Logic:
Whole Foods+Healthy Valley+Healthy Choice+Progresso -Nissin Cup Noodles and Campbells
Logic:
Sum(Whole Foods) - Sum(Healthy Valley+Healthy Choice+Nissin Cup Noodles) - Sum (Progresso + Campbells)
Try this:
=Sum({<[Soup Brand]={'Whole Foods'}>}[Cost])
-Sum({<[Soup Brand]={'Health Valley','Healthy Choice','Nissin Cup Noodles'}>}[Cost])
-Sum({<[Soup Brand] ={'Progresso','Campbells'}>}[Cost])
Thanks