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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tomshaw83
Helper I
Helper I

Help with basic IF problem

Hi, I am trying to write a simple IF statement in Power Query, I want to return a value every time an odd value appears in a rank column. I am writing 

 

if [rank] = Number.IsOdd then [ExampleColumn] else [ExampleColumn2]

 

The Number.IsOdd section is picking up, can anyone help point me in the right direction?


Thanks


Tom

 

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @tomshaw83 ,

 

You need to use the Number.IsOdd function correctly:

if Number.IsOdd([rank]) then ... else ...

 

 

 

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

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @tomshaw83 ,

 

You need to use the Number.IsOdd function correctly:

if Number.IsOdd([rank]) then ... else ...

 

 

 

Pete



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

Proud to be a Datanaut!




Thank you

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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