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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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