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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
avaldes
Frequent Visitor

Deafult string value for blanks in Power BI Desktop measures.

Hi, I have two tables ( Sales[OrderNumer,Price,ItemId,...] and Item[Id, Name, Type] ) and I have a measure that returns a string like that:

 

 ItemsType1 = CALCULATE(
     CONCATENATEX('Sales', RELATED('Item'[Name]), ","), 'Item'[Type] = "type1" 

I have a table visual in Power BI Desktop at Order level with the measure ItemsType1 [OrderNumer, ItemsType1]. I want to change BLANK values of ItemType1 column by a default value like "n/a" and I rewrote the measure as:

 

 ItemsType1 = VAR x = CALCULATE(
     CONCATENATEX('Sales', RELATED('Item'[Name]), ","), 'Item'[Type] = "type1" 
 RETURN IF( ISBLANK(x), "n/a", x )

But, in this way memory grows abruptly and the visual collapses. I have 16GB of memory. I think the problem is with the IF statement but I do not know why.

Can someone help me to solve this?

Thanks for any help.

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @avaldes,

 

I tested with above measure, it returned expected result.

1.PNG

 

What error message did you get? Have you tried restarting your Power BI desktop and typing the formula again?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft, thanks for your reply. You are correct, the measure returns the expected value, my problem is with the memory usage. My Sales table has around 600000 rows and I have 16GB RAM, when I use the first measure (without `n/a`) the memory usage is low but when I use the second the memory usage grows abruptly (take all memory) and the visual collapses. I would like to understand why this difference in performance if I only add an IF statement and what is the best way to do this.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.