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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to replace empty/blank cell to zero?

Hi, I have a measure to calculate the Volume Impact. But some of the cell in [Volume Sum] is blank. 

If the [Volume Sum] is blank, I want it to be set as zero so that it could calculate the volume impact measure correctly.

 

For example, Product A in 2020-10, the [Volume Impact Total] should be (0-1)*313 = -313 [395 which is incorrect].

For Product B in 2021-09, the [Volume Impact Total] should calculate as (0-1)*34 = -34.

 

The [Volume Impact Total] should has the same value as [Revenue YoY] for those lines highlighted in red.

How to fix the measure below? Here is the pbix file.

 

Volume Impact = 
IF (
MIN ( 'Calendar'[Date] ) > MAX ( 'Append Table'[Date] ),
CALCULATE (
SUMX (
SUMMARIZE ( 'Append Table', 'Calendar'[YearMonth],'Append Table'[Material_Combine]),
IF (
[Volume Last Year] <= 0,
( [Revenue] - [Revenue Last Year] ),
( [Volume Sum] - [Volume Last Year] ) * [AUSP Last Year]
)),
SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
)*-1,
SUMX (
SUMMARIZE ( 'Append Table','Calendar'[YearMonth], 'Append Table'[Material_Combine] ),
IF (
[Volume Last Year] <= 0,
( [Revenue] - [Revenue Last Year] ),
( [Volume Sum] - [Volume Last Year] ) * [AUSP Last Year]
)))

 

PBI_newuser_0-1640152579401.png

 

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @PBI_newuser 

I tried, change the blank cell to zero won't help,

vxiaotang_0-1640574674878.png

But values become correct when I try this,

vxiaotang_1-1640574746968.png

So you may need to check the code in variable _a.

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @PBI_newuser 

I tried, change the blank cell to zero won't help,

vxiaotang_0-1640574674878.png

But values become correct when I try this,

vxiaotang_1-1640574746968.png

So you may need to check the code in variable _a.

 

Best Regards,

Community Support Team _Tang

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

YukiK
Impactful Individual
Impactful Individual

There are multiple ways to do this, but one way I'd usually go with is to add "+ 0" to your measure. e.g. If I have a measure saying 

SUM(sales)

then I'll change it to

SUM(sales) + 0

 

Please give it a thumbs up if this helps!

Hi @YukiK , thanks for the suggestion but it doesn't work for my case.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.