Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
We had measures of “Price Variance” which calculated as:
So that we get variance as [IMS Price CY]-[IMS Price LY])*[Quantity Net LY] only if all variables are above 0, otherwise just show 0.
However, for the subtotal it uses the formula to calculate on the last row again, where we just want simple sum of all the price variance showing above.
How to fix this using only one measure with the correct subtotal?
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please try something like below.
IMS Price Variance =
SUMX (
VALUES ( 'tablename'[DISTRIBUTION_CHANNEL] ),
CALCULATE (
SWITCH (
TRUE (),
[IMS Price CY] <= 0, 0,
[IMS Price LY] <= 0, 0,
[Quantity Net LY] <= 0, 0,
( [IMS Price CY] - [IMS Price LY] ) * [Quantity Net LY]
)
)
)
Hi,
I am not sure how your datamodel looks like, but please try something like below.
IMS Price Variance =
SUMX (
VALUES ( 'tablename'[DISTRIBUTION_CHANNEL] ),
CALCULATE (
SWITCH (
TRUE (),
[IMS Price CY] <= 0, 0,
[IMS Price LY] <= 0, 0,
[Quantity Net LY] <= 0, 0,
( [IMS Price CY] - [IMS Price LY] ) * [Quantity Net LY]
)
)
)
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |