Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Group By Formula

Hi,

 

I have a column 1 with all my costumers and I have other column 2 where I categorize them as "G" and "O" what I want is a new column 3 where I have all the costumers O by name and all the customers that belong to G, only have a G insted of the costumer name

 

Example column 3

Customer 1 (all the customers that are in category O will appear with the name as column 1)

Customer S

Customer 45

Customer AB

G (all the customers that are in this category will appear with a G instead of the name as column 2)

1 ACCEPTED SOLUTION
Thejeswar
Super User
Super User

Hi @Anonymous ,

Create either a Calculated Column. The Below is how the DAX will look

Column3 = IF(Column2 = "G", Column2, Column1)

 

If you want more clarity refer the below link

IF function (DAX) - DAX | Microsoft Learn

 

If you share some sample data and expected output, the DAX can be more focused

View solution in original post

1 REPLY 1
Thejeswar
Super User
Super User

Hi @Anonymous ,

Create either a Calculated Column. The Below is how the DAX will look

Column3 = IF(Column2 = "G", Column2, Column1)

 

If you want more clarity refer the below link

IF function (DAX) - DAX | Microsoft Learn

 

If you share some sample data and expected output, the DAX can be more focused

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (2,374)