Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I need help with properly creating a model to evaluate production costs depending on a way to get components.
In my case, it's 3 variants.
The default variant is "produce", so if some products (BOM) don't have a "buy" or "customer-provided" variant, it should be calculating the first one.
In my report, I want to dynamically change these valuations in variants by a slicer.
(I suppose I need to create an additional filter table with no relationships? )
Also, these evaluations could be different for each day, because material prices are changing daily.
In the end, I need to somehow combine these 3 measures into one and have all of these calculations in one BOM table.
Sample file:
https://drive.google.com/file/d/1JRV1vmfxwaJF0u80TliFXHlDTfiXwRmP/view?usp=sharing
Solved! Go to Solution.
Assmuning your measures are correct, you need a SWITCH measure to return the measure based on the selection in the slicer:
Total Unit Cost =
SWITCH (
SELECTEDVALUE ( Variants[Variants] ),
"Buy", ["Buy" Total Unit Cost],
"Customer-provided", ["Customer-Provided" Total Unit Cost],
["Produce" Total Unit Cost]
)
And
to make the title dynamic:
Title = SELECTEDVALUE(Variants[Variants]) & " Variant"
I've atteched the PBIX file for your reference
Proud to be a Super User!
Paul on Linkedin.
Assmuning your measures are correct, you need a SWITCH measure to return the measure based on the selection in the slicer:
Total Unit Cost =
SWITCH (
SELECTEDVALUE ( Variants[Variants] ),
"Buy", ["Buy" Total Unit Cost],
"Customer-provided", ["Customer-Provided" Total Unit Cost],
["Produce" Total Unit Cost]
)
And
to make the title dynamic:
Title = SELECTEDVALUE(Variants[Variants]) & " Variant"
I've atteched the PBIX file for your reference
Proud to be a Super User!
Paul on Linkedin.
.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
75 | |
64 | |
39 | |
34 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |