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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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