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

Using message N/A instead of BLANK

Hi all, 

I am making a report , that contains 4-5 slicers, i want to ask one thing that whenever I make selections from the slicer then the corresponding results appears on my dashboard, but sometimes when the relevant data is not present, it shows BLANK, but I want N/A instead of BLANK, how to go ahead with this ?

Can somebody please help ?
Thanks !

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

I think this should cover your requirement:

 

yourMeasure =
VAR calc =
//Put all your original measure code into a variable here
CALCULATE (
COUNTROWS ( MVIEW_PRICING_CHALLENGES ),
FILTER ( MVIEW_PRICING_CHALLENGES,
MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
>= ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) - W_NO_DAYS )
&& MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
< ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) )
)
)
RETURN
//Reference variable within IF statement
IF(
ISBLANK(calc),
"N/A",
calc
)

 

 

You could also use the same variable method, but change the code after RETURN to the following to use @Anonymous 's tidier method:

COALESCE(calc, "N/A")

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Create a new measure based on the one you have:

[New Meas] = COALESCE( [Old Meas], "N/A")

Best
D
Anonymous
Not applicable

@Anonymous 

 

You can use replace value feature in Query Editor, which is the most straightforward way.

replacevalue.JPG

 

Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BA_Pete
Super User
Super User

Hi @Anonymous

Try something like:

IF(
ISBLANK([Measure]),
"N/A",
[Measure]
)


Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi, 

I tried manipulating my measure but that is showing blank.

My measure is : 

CALCULATE (
COUNTROWS ( MVIEW_PRICING_CHALLENGES ),
FILTER ( MVIEW_PRICING_CHALLENGES,
MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
>= ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) - W_NO_DAYS )
&& MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
< ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) )
)
)

Can you please tell me how to manipulate this measure ?
or, do we have create one more measure for this apart from my original one ?
Thanks !

Hi @Anonymous 

 

I think this should cover your requirement:

 

yourMeasure =
VAR calc =
//Put all your original measure code into a variable here
CALCULATE (
COUNTROWS ( MVIEW_PRICING_CHALLENGES ),
FILTER ( MVIEW_PRICING_CHALLENGES,
MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
>= ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) - W_NO_DAYS )
&& MVIEW_PRICING_CHALLENGES[CREATEDTIMESTAMP].[Date]
< ( SELECTEDVALUE ( 'DATE TABLE'[Date] ) )
)
)
RETURN
//Reference variable within IF statement
IF(
ISBLANK(calc),
"N/A",
calc
)

 

 

You could also use the same variable method, but change the code after RETURN to the following to use @Anonymous 's tidier method:

COALESCE(calc, "N/A")

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thanks !

I removed that error and it is working properly now.

Anonymous
Not applicable

No, still this is no working 
error: the syntax of VAR is incorrect.

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.