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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
JayTG123
Advocate I
Advocate I

Replace Unique Text Values to Number 1

Hi all,

 

I am hoping someone can help with this. I have a list of unique text values (Linked Permit column) and just want to replace this with a 1 so it can become a SUM and as a total on a card visual. For everything that is blank I will replace this with a 0 but I would like to know how I can replace all of these unique values as a number 1 please.

Many thanks

Jay
Screenshot 2021-12-31 154815.jpg

 

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Hi @JayTG123 

In Power Query add an conditional column and use IF is equal Blank then return 0, else 1 

aj1973_0-1640966614839.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

BTW, you don't need another column to calculate the sum of non-blank values.

 

An alternative would be to write a measure that counts the non-blank values.

CountNonblank = CALCULATE ( COUNT ( Table1[Linked Permit] ), Table1[Linked Permit] <> "" )
aj1973
Community Champion
Community Champion

Hi @JayTG123 

In Power Query add an conditional column and use IF is equal Blank then return 0, else 1 

aj1973_0-1640966614839.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 thank you so much!! You learn something every day!

Happy New Year to you ! 

Jay

aj1973
Community Champion
Community Champion

lol indeed, never stop learning 🙂

 

Happy new year to you as well

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors