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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
GShal
New Member

DAX Query

Hi,

I am trying to create ifese function but is is not giving me any column name in logical condition

eXAMPLE: I am creating a new column with condition IF(--  = "Mumbai", true,false)

So where -- is present no column name is coming here it giving me an error in the formula

 

Please help

2 ACCEPTED SOLUTIONS
Syk
Super User
Super User

If this is for a measure, you have to use an aggregation function. Trying something like 

some_measure = IF ( MAX('table'[column]) = "Mumbai", 1, 0)



View solution in original post

Anonymous
Not applicable

Hi @GShal ,

 

Thanks @Syk  for the quick reply. I have some other thoughts to add:

 

If you want to create a calculated column, first select a table and then click New Column.

vtangjiemsft_0-1716187575232.png

Enter the following formula.

Column = IF([Column1]="Mumbai","true","false")

Then the result is as follows.

vtangjiemsft_1-1716187660861.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @GShal ,

 

Thanks @Syk  for the quick reply. I have some other thoughts to add:

 

If you want to create a calculated column, first select a table and then click New Column.

vtangjiemsft_0-1716187575232.png

Enter the following formula.

Column = IF([Column1]="Mumbai","true","false")

Then the result is as follows.

vtangjiemsft_1-1716187660861.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Syk
Super User
Super User

If this is for a measure, you have to use an aggregation function. Trying something like 

some_measure = IF ( MAX('table'[column]) = "Mumbai", 1, 0)



Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.