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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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