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
Steels_Cat
Frequent Visitor

Wrong calculation on the stacked chart

Hello. I have strange issue. I have stacked chart with X-axis - Date and Y-axis a Measure where I count documents number with two different filters and divide them. The problem is that, the chart does not recognize that for a COUNTRY i do have blanks but, the chart do not exclude them even if I put the measure in pane filter with "IS NOT BLANK". I need to recreate that logic where Power Bi can calculated for each country the measure and can exclude the blanks from the chart view. I`m using direct query for this report. Is not possible to switch to Import

Steels_Cat_1-1678272214098.png

 

2 REPLIES 2
Steels_Cat
Frequent Visitor

measure
Measure 1 - CALCULATE(SUM('Chart Table'[Value]), 'Chart Table'[Value2] = "X")
Measure 2 - CALCULATE(SUM('Chart Table'[Value]), 'Chart Table'[Value3] = "X")

Measure 3 -DIVIDE(Measure1], [measure2 ],0) - this one in on the chart . 
My logic is that somehow i need to create additional logic that will make group by for all my slicers which are based on the fields from my table. For example I have a country slicer and when i select particular country from the slicer, my measure does not exclude that country which has BLANK value. From the example above, the measure should have to exclude PT from the chart view, but somehow the power bi does recognized as a blank value. 
amitchandak
Super User
Super User

@Steels_Cat , please share your measure

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.