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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Kent1341
Helper I
Helper I

If the value is Blank it must be 0

Hi,

 

I have a problem with my sum's. The problem is that if a manufacturer doesn't have a product in this subsegment, it doesn't give the value 0 but it gives a blank value. My calculation is very simple 

FACT VALUE = sum(Data[Sales Value]).
I have tried if(isblank(sum(Data[Sales Value])),0,sum(Data[Sales Value])) with no lock.
My problem is that I want to calculate the total share and of a manufacturer and you can see below that when the first and second are chosen the value is 15,1% and when it's only the first that is chosen the value is 18,8%. 
 
image.pngimage.png
Can anyone help me?
 
Br Kent
 
1 REPLY 1
amitchandak
Super User
Super User

@Kent1341 , Not very clear. As at end seem like you are looking for something else

 

sum(Data[Sales Value])+0 should handle the blank. But it work best when sub segment 1 is from another dimension

 

for % of total

divide(sum(Data[Sales Value]), calculate(sum(Data[Sales Value]), allselected() ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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