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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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() ) )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors