Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I have created a measure that divides 2 different variables and called it "price per pack"
(Price per pack =
DIVIDE(
SUM('Value'[Value (in 1000 RUR)]),
SUM('Volume'[Volume (in mln STICKS)])
)*20/1000
This measure filters price per pack at different levels (e.g. brand, price catgory etc.). So if I don't use any filters, then it shows a weighted average price of the entire category.
I am now trying to calculate price indeces of individual filters (e.g. brands, pricing catergories etc.) in relation to the weighted average price of the entire category.
Would be grateful for any advise.
Russel
Solved! Go to Solution.
to be honest I don't get why you use Brand and Price Segment in ALLEXCEPT, what's the goal there? I thought you want to compare particular level with the total category? My original formula woud do that
Other than that you can put multiple fields in single ALLEXCEPT, e.g.
ALLEXCEPT(Value,Value'[BRAND],Value'[PRICE SEGMENT])
but I don't get why you want to do that
I wanted to see indices of individual brands vs total category, correct. I've figured out how to do that. Here's the formula that I've used:
WAP = DIVIDE([Price per pack], CALCULATE([Price per pack], all(Brand[BRAND])
))
Thanks for the inspiration!
try this code, you will have to adjust the blue syntax
Measure =
DIVIDE ( [Price per pack], CALCULATE ( [Price per pack], ( ALLEXCEPT ( 'Table', 'Table'[Category] ) ) ) )
Thanks for the reply.
After creating this measure, I created a matrix with brands in rows, time periods in columns and the measure in values. But they don't match the manual calculation in Excel. Do you know what could be the reason?
Below is how I've constructed the measure.
Measure = DIVIDE([Price per pack], CALCULATE([Price per pack], ALLEXCEPT('Value','Value'[BRAND]), ALLEXCEPT('Value','Value'[BRAND]),ALLEXCEPT('Value','Value'[PRICE SEGMENT]
))).
to be honest I don't get why you use Brand and Price Segment in ALLEXCEPT, what's the goal there? I thought you want to compare particular level with the total category? My original formula woud do that
Other than that you can put multiple fields in single ALLEXCEPT, e.g.
ALLEXCEPT(Value,Value'[BRAND],Value'[PRICE SEGMENT])
but I don't get why you want to do that
I wanted to see indices of individual brands vs total category, correct. I've figured out how to do that. Here's the formula that I've used:
WAP = DIVIDE([Price per pack], CALCULATE([Price per pack], all(Brand[BRAND])
))
Thanks for the inspiration!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |