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
Hi,
i have a table with 2 columns (Client name, Saleprice)
i need to add a new column "Segmentation" that it takes the parameter from Min and Max and put the value A, B, C and D from the table below
EX: of new table with new column
Client Name Sales Price Segmentation
AAAA 1200 B
BBBB 500 A
CCCC 7500 D
Many thanks
Solved! Go to Solution.
Hi @AlessandroBet
The previous code will work, because when you use >= , it will show you proper data
or try below code, here I have mentioned both range. Please change range as per your requirement
= if [Sales Price] >= 5000 and <= 9999.9999 then "D" else if [Sales Price] >= 3000 and <= 4999.9999 then "C" else if [Sales Price] >= 1000 and <= 2999.9999 then "B" else "A"
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS
Thanks but i have to set 2 paramiters Min and Max and not only 1
Hi @AlessandroBet
The previous code will work, because when you use >= , it will show you proper data
or try below code, here I have mentioned both range. Please change range as per your requirement
= if [Sales Price] >= 5000 and <= 9999.9999 then "D" else if [Sales Price] >= 3000 and <= 4999.9999 then "C" else if [Sales Price] >= 1000 and <= 2999.9999 then "B" else "A"
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS
Hi @AlessandroBet
If the Parameter table is fixed and parameter data are not changing
Then you can create a custom column in your second table with name Segmentation in use the below code
= if [Sales Price] >= 5000 then "D" else if [Sales Price] >= 3000 then "C" else if [Sales Price] >= 1000 then "B" else "A"
Let me know if it solve your requirement
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 July 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
108 | |
68 | |
46 | |
43 |
User | Count |
---|---|
188 | |
87 | |
77 | |
74 | |
60 |