cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zuro16
New Member

Assign legend "low margin" based on margin percentage per order type

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

 

OrderOrder TypeMarginText assignment ( New column)
azs0215% 
bzs032%Low Margin
czs043%Low Margin
dzs039% 
ezs0410% 
fzs0210%Low Margin
gzs034%Low Margin
hZS0216% 
iZS045%Low Margin
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

Re: Assign legend "low margin" based on margin percentage per order type

@zuro16 

 

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())

 

image.png

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

View solution in original post

3 REPLIES 3
Highlighted
Super User I
Super User I

Re: Assign legend "low margin" based on margin percentage per order type

@zuro16 

 

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())

 

image.png

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

View solution in original post

zuro16
New Member

Re: Assign legend "low margin" based on margin percentage per order type

Thanks much VasTg!

zuro16
New Member

Re: Assign legend "low margin" based on margin percentage per order type

@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.

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors