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.
I have three order types based on "order" being with external customer (order type ZS02) or internal customer (order types ZS03, ZS04). I'd like to assign the legend "low margin" ( on new column) based on thresholds defined per the order types. The thresholds are 12% or less than 12% for order typeZS02, 7.5% or less for order type ZS03, and 6.4% or less for order type ZS04. Below a mock table of the final -desired- output ( last column would be the column with the legend). How can this be accomplished
|
Solved! Go to Solution.
Are you trying to create the new column(4th col) in the mockup?
Try this as a calculated column
Column = SWITCH(TRUE(),
'Table (2)'[Order Type] = "zs02" && 'Table (2)'[Margin] <=0.12,"Low Margin",
'Table (2)'[Order Type] = "zs03" && 'Table (2)'[Margin] <=0.075,"Low Margin",
'Table (2)'[Order Type] = "zs04" && 'Table (2)'[Margin] <=0.064,"Low Margin",
BLANK())
If it helps, mark it as a solution
Kudos are nice too
Are you trying to create the new column(4th col) in the mockup?
Try this as a calculated column
Column = SWITCH(TRUE(),
'Table (2)'[Order Type] = "zs02" && 'Table (2)'[Margin] <=0.12,"Low Margin",
'Table (2)'[Order Type] = "zs03" && 'Table (2)'[Margin] <=0.075,"Low Margin",
'Table (2)'[Order Type] = "zs04" && 'Table (2)'[Margin] <=0.064,"Low Margin",
BLANK())
If it helps, mark it as a solution
Kudos are nice too
@VasTg What if one the lines is negative (less than 0 <zero>) on the planned margin ( on any of the order types), and instead of returning the legend "low margin", I'd like to get the word "Negative margin", but -still- I'd like to keep the "low margin" on those above 0 (zero) margin? is this something we can build on top of the formula you've suggested or this would be an entirely different formula? Thank you, Carlos.
Thanks much VasTg!
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |