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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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