Forum Discussion
Multiplier depending on critera
- 3 years ago
Hey there Anonymous,
What you need to do is create a DAX Calculated column. The formula should look like this:
Column Name = If('Table'[Channel] = "Disty", 'Table'[Cost] * 1.06, 'Table'[Cost])
If this is correct please think about marking it as a solution. - 3 years ago
Oh you're saying you just don't want the Direct cost? Only disty?
Disty Cost = CALCULATE ( SUM ( 'table'[cost] ), 'table'[Channel] = "Disty" ) * 1.06
A few things to consider when choosing a calculated column vs measure.
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/#:~:text=The%20difference%20is%20the%20context,the%20table%20it%20belongs%20to.
Try the measure I posted earlier to see if you get your desired result.
Hello Syk I tried your solution as well, and though it works in isolated instances. It also like the column doesn't work when I use certain filters. Any ideas how I get it to apply to when I filter?
- Syk3 years agoResident Rockstar
Depends on your relationships and the filter.. Can you give an example?
- Anonymous3 years agoNot applicable
So I added the table below to show sort of what I mean. I'm only using one data source right now, so no relationships have been made. I simply will choose a Company, and it will sum up all the ones labled "Disty" not just Company A for instance.
Company Channel Cost A Direct $ 100.00 B Disty $ 200.00 C Disty $ 100.00 A Direct $ 500.00 A Disty $ 600.00 - Syk3 years agoResident Rockstar
You're trying to sum this up by company? A little confused by this response.
Right now this is what I'm showing by copying your example.If you set Cost to sum, you'll get
And if you want it rolled up by company, just remove the other details