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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Result based on 2 columns

Hi,

I need to create a custom  Categeory = "BA" and "Place" ="" then "BA" else "".

 

image.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

if(not(isblank([Categeory])) && isblank([Place]), [Categeory], blank())

 

Based on highlighted column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

BA_Pete
Super User
Super User

@Anonymous 

 

In Power Query, you would create a custom column as follows:

 

requiredColumn =
if [Categeory] <> null and [Place] = null then [Categeory] else null

 

 

@amitchandak has already provided the best DAX solution.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
FrankAT
Community Champion
Community Champion

Hi @Anonymous ,

you can do it like this:

 

08-03-_2021_17-19-22.png

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

BA_Pete
Super User
Super User

@Anonymous 

 

In Power Query, you would create a custom column as follows:

 

requiredColumn =
if [Categeory] <> null and [Place] = null then [Categeory] else null

 

 

@amitchandak has already provided the best DAX solution.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

if(not(isblank([Categeory])) && isblank([Place]), [Categeory], blank())

 

Based on highlighted column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.