Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
Could someone help me in deriving result A to result B? Wherein I wanted to fall General Office in Small Business (see result B)
I have 2 columns and I have used a SWITCH STATEMENT but it's not working 😞
I'm getting below result:
| RESULT | |
| SEG_MAJ_GRP | SEG_DESC |
| CORP | > 500 |
| CORP | NATIONAL OFFICE |
| HOME | |
| HOME | LOCAL OFFICE |
| HOME | HOME OFFICE |
| SMALL BUSINESS | < 500 |
| N/A | UNDETERMINED |
Here's my calculated column:
| RESULT A | |
| SEG_MAJ_GRP | SEG_DESC |
| CORP | > 500 |
| CORP | NATIONAL OFFICE |
| HOME | GENERAL OFFICE |
| HOME | LOCAL OFFICE |
| HOME | HOME OFFICE |
| SMALL BUSINESS | < 500 |
| N/A | UNDETERMINED |
Desired Result:
| RESULT B | |
| SEG_MAJ_GRP | SEG_DESC |
| CORP | > 500 |
| CORP | NATIONAL OFFICE |
| SMALL BUSINESS | GENERAL OFFICE |
| HOME | LOCAL OFFICE |
| HOME | HOME OFFICE |
| SMALL BUSINESS | < 500 |
| N/A | UNDETERMINED |
Thanks a lot! 😄
Solved! Go to Solution.
@icdns ,
Create another calculated column for that. Liek below.
Proud to be a Super User!
@icdns ,
Can you share some sample data or PBIX with Sample data??
Reards,
Manikumar
Proud to be a Super User!
Hi @manikumar34 ,
Sorry i cant paste the file here. but this is just my dataset
Thank you!
Table Name: Table
| SEG_MAJ_GRP | SEG_DESC | CUSTOMER_COUNT |
| CORP | > 500 | 169 |
| CORP | NATIONAL OFFICE | 19 |
| HOME | GENERAL OFFICE | 3832 |
| HOME | LOCAL OFFICE | 169 |
| HOME | HOME OFFICE | 110933 |
| MEKO USE | MEKO USE | 0 |
| N/A | UNDETERMINED | 1 |
| SMALL BUSINESS | < 500 | 1359 |
@icdns ,
I'm not clear but if you are looking something like below, Use the provided DAX.
Proud to be a Super User!
Hi @manikumar34 ,
Very near!! 😄 But is it possible instead of HOME, GENERAL OFFICE will fall under SMALL BUSINESS? (See font in Red)
Thanks alot!!! 🙂
@icdns ,
Create another calculated column for that. Liek below.
Proud to be a Super User!
it is now working! Thank you!
Awesome, you got the Answer you are looking for.
Your Kudos will be Appreciated. 🙂
Regards,
Manikumar
Proud to be a Super User!
@icdns , Try like
SEG_MAJ_GRP_SWITCH = IF(TABLE[SEG_MAJ_GRP] = "CORPORATE",
SWITCH(true(),
TABLE[SEG_DESC], ">500",">500"
,"NATIONAL OFFICE","NATIONAL OFFICE"
),
///and add on
Hello @amitchandak ,
When i tried to use the logic, it returns below error:
What does this mean? 😞 Thank you for the help!
@icdns , My bad , something like this
SEG_MAJ_GRP_SWITCH = IF(TABLE[SEG_MAJ_GRP] = "CORPORATE",
SWITCH(true(),
TABLE[SEG_DESC]= "500",">500",
TABLE[SEG_DESC]= "NATIONAL OFFICE","NATIONAL OFFICE"
),
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |