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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

IF value column is blank return a string (HOW??)

Annotation 2020-02-26 141059.png

 

Hello, 

 

I have a column called clicks where i only have one value and otherwise i have blanks. I want a new column called click1 where if blank = "-" , if not blank then the value. But it doesn't seem to work because it can't combine string and values. But is I choose 0 instead of "-" it work. Do anyone have a solution for this? 

Thank you in advance

 

 

1 ACCEPTED SOLUTION
AlexAlberga727
Resolver II
Resolver II

Because you're not able to have a single column contain mutiple types of data you need to ensure the output is of the same data type.

 

I know in some programs zeros can be displayed as a hyphens (-). However, I do not see this option within Power Bi. You could always treat these values as text, but then would lose functionality. 

View solution in original post

3 REPLIES 3
AlexAlberga727
Resolver II
Resolver II

Because you're not able to have a single column contain mutiple types of data you need to ensure the output is of the same data type.

 

I know in some programs zeros can be displayed as a hyphens (-). However, I do not see this option within Power Bi. You could always treat these values as text, but then would lose functionality. 

Greg_Deckler
Community Champion
Community Champion

Right, you would have to have your [Value] & "" in the first case and this would make it text so it would be compatible with a dash (-) character. But, now you have a text column and that may or may not be OK.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

So how would you suggest the code to be? 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.