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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
anacpint
Helper I
Helper I

Replace blanks after filtering

Hello,

I built this measure:

RFT_v1_Total = VAR Correct =
 
CALCULATE (SUM ( FactRFTJnJPap[Qty_Correct] )
,
DimMeasures[IDMeasureJnJPharma] = 3,
DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 },
DATESBETWEEN (
DCalendar[FullDate],
EOMONTH ( TODAY (), -12 ),
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
)
)
VAR Total =
 
CALCULATE (
SUM ( FactRFTJnJPap[Qty_Correct] ) + SUM ( FactRFTJnJPap[Qty_Low] )
+ SUM ( FactRFTJnJPap[Qty_Moderate] )
+ SUM ( FactRFTJnJPap[Qty_Severe] ) ,
DimMeasures[IDMeasureJnJPharma] = 3,
DATESBETWEEN (
DCalendar[FullDate],
EOMONTH ( TODAY (), -12 ),
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
),
DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 }
)
RETURN
DIVIDE ( Correct, Total )
 
It works great, but now I need to replace the null values with "N/A" after considering the filters (
DimMeasures[IDMeasureJnJPharma] = 3,
DATESBETWEEN (
DCalendar[FullDate],
EOMONTH ( TODAY (), -12 ),
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
),
DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 })
 
I've tried a lot of solutions and all that I get was all the null values with "N/A" but ignoring all the filters.
 
What I need is something like this:
anacpint_0-1665593880571.png

 

Thanks in advance for your help.

Regards,

Ana.

2 REPLIES 2
Anonymous
Not applicable

Hi @anacpint ,

 

Based on your description, you want to replace the null value.
If you want to replace null values based on the result returned by the measure, you just need to use IF([measure]=BLANK(), "N/A", [measure]), but for your problem, you want to ignore all the filters, I don't know exactly what you mean.
Can you provide us with some of your sample data and the results you ultimately want to show, so that we can help you better.

 

Best Regards,

Neeko Tang

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

 

Hello @Anonymous , thank you for your answer!
I've tried that solution and it doens't work. No, I need to replace the blanks after execute the measure but considering all the filters. When I try to implement your solution it replaces all the blanks yes, but for all my calendar dates and for all my types of report. I need to replace the blanks, after executing the measure and filtering all the data with the datesbetween condition and just for two types of report.

 

This is what I have now:

anacpint_0-1665650446811.png

So, isn't showing any value for both reports in November 21 and for December is just showing data for one of them, because I don't have any record, that's why I need to replace this null values. According with all the requirements I need to display something for the months that don't have any records otherwise I will display an "incomplete" calendar.

 

Thank you once again.

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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