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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.