The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello
I am wanting to generate a measure derived from another, based on Total Sales (previous measure) but now another, associated with products with Profit Margin (another measure) greater than 35%, and where sales do not correspond to products with this condition, which places $ 0. What dictates my understanding is that it should be Measure = CALCULATE([Total Sales], FILTER(Measures,Measures[Profit Margin]>=0.35))), however, under this formula Total Sales are being returned without being affected by the filter. Could you help me with the error or guide me with a suitable solution? The idea with this measure is to generate a column chart where total sales are displayed, how much corresponds to the number of products with the highest margin.
Thank you for the support and guidance.
You need to create a summary table which can be used as a filter, but you first need to determine at what granularity you want to measure the profit margin. If it is over the entire life of the product you could do something like
Sales High Margin =
CALCULATE (
[Total Sales],
FILTER ( VALUES ( 'Sales'[Product ID] ), [Profit Margin] >= 0.35 )
)
but if you wanted to calculate profit margin at the product and year grain it would be something like
Sales High Margin =
CALCULATE (
[Total Sales],
FILTER (
SUMMARIZE ( 'Sales', 'Sales'[Product ID], 'Date'[Year] ),
[Profit Margin] >= 0.35
)
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
79 | |
72 | |
48 | |
39 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
56 |