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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

ISNULL handing using Dax or Power query by creating new column

Hi Folk's,

 

Greetings!!

 

I need help on INULL handling using Dax or Power query by creating new column, Sample data below

Please help me how to achive "Consolidated Rank" column

 

NameRank1Rank2Rank3Rank4Rank5Rank6Consolidated Rank
John1     1
Raj 22   2
Chris   3  3
Ryan    444

 

Thanks In Advance.

1 ACCEPTED SOLUTION

@Anonymous Ok !! Here it is to achieve the same output in "Power Query Editor"

 

Add a "Conditional Column" as below:

 

image.png

 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

5 REPLIES 5
PattemManohar
Community Champion
Community Champion

@Anonymous Please try this...

 

Consolidated Rank = SWITCH(TRUE()
                          ,RankTest[Rank1] <> BLANK(),RankTest[Rank1] 
                          ,RankTest[Rank2] <> BLANK(),RankTest[Rank2]
                          ,RankTest[Rank3] <> BLANK(),RankTest[Rank3]
                          ,RankTest[Rank4] <> BLANK(),RankTest[Rank4]
                          ,RankTest[Rank5] <> BLANK(),RankTest[Rank5]
                          ,RankTest[Rank6] <> BLANK(),RankTest[Rank6]
                          ,BLANK())

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

Thanks for your reply, I'm getting "Expression.Error: The name 'SWITCH' wasn't recognized.  Make sure it's spelled correctly."

Swith will work on design side but i want it in Power query as a new column.

@Anonymous Add New Column in Data pane using "New Column" option not in "Power Query Editor"

 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

@PattemManohar Agree but i want to do it in Power Query because i need to apply some aggregation post to this logic.

If i  do it in Data Pane i cant able to see that data in "Power Query Editor"

 

@Anonymous Ok !! Here it is to achieve the same output in "Power Query Editor"

 

Add a "Conditional Column" as below:

 

image.png

 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors