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
farhad_mahan
New Member

problem with "if" function

Hi every one

When I select the if function, the dex bar does not show the columns that I select

please help me

🛑

2 REPLIES 2
Anonymous
Not applicable

Hi @farhad_mahan 

It seems that you use the if() function in measure, when you use the condition, you need to add some function then the column can display,

e.g 

Measure =
IF ( SELECTEDVALUE ( table[id] ) = 1, 1, 0 )

If the column type is number, you can use the function as @Idrissshatila  mentioned, such as sum(), max() and so on, if the column type is text you can use the function such as, max(), selectedvalue().

 

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.

Idrissshatila
Super User
Super User

Hello @farhad_mahan ,

 

the if function in a measure only takes functions like sum(column) or min, avg or etc.. but it doesn't take a column value directly.

 

but when you're using if in a calculated column then you could reference the column directly.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote for my Community Mobile App Idea 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.