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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi
i want to group specific types together and if i wanted to add additional columns to visualisation table it would read behind the group and look at data.
i assume its like excel where you write a if and statement but can it be a measure or is it better to a custom column?
e.g
=if(and(types=333,types=339),A330,types
=if(and(types=351,#="min"),A350L,types
types | > | Types |
777 | 789 | |
787 | 330 | |
333 | 350 | |
351 | 350L | |
339 | ||
388 | ||
380 |
# |
MIN |
GIN |
Solved! Go to Solution.
Hi @AI14
Here is the example based on my understanding of the information you have offered.
You can create a new column, you can use switch() function
Types = SWITCH(TRUE(),OR(Query1[type]=777,Query1[type]=787),"787",OR(Query1[type]=333,Query1[type]=339),"A380",Query1[type]=351,"350")
and I cannot sure that if your "#" is a column in the table above, or a field to be put to a slicer.
You can refer to the following link to know about switch() function.
SWITCH function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AI14
Here is the example based on my understanding of the information you have offered.
You can create a new column, you can use switch() function
Types = SWITCH(TRUE(),OR(Query1[type]=777,Query1[type]=787),"787",OR(Query1[type]=333,Query1[type]=339),"A380",Query1[type]=351,"350")
and I cannot sure that if your "#" is a column in the table above, or a field to be put to a slicer.
You can refer to the following link to know about switch() function.
SWITCH function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i want the left types to be grouped to the right so i can use a groupe type instead of them individually.
i tried to do a if(and formula in powerbi but it wouldnt allow me to have more than 2 if's
desired column outcome:
787 & 777 > 787
333 & 339 > A380
351 > 350
351 + reg > 350L (reg could be on of exampleson the table below the eg "#"
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |