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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to exclude Zero values in Line chart

Dear Team,

 

I want exclude Zero values in Line chart , I have two condition filter tables , if these two table satified then i sum the values .

Here some days may be values zero will come, but i dont want to show if zero value available in both measures.

 

Table 1 :

Measurebydays = DATATABLE("Selection";INTEGER ;{{"1"};{"2"};{"7"};{"15"};{"31"}})

 
Table  2 :
 MeasureBy = DATATABLE("Selection";STRING ;{{"Quantity-EQ"};{"CBM-EQ"}})
 
Last Measure 
 
PLast =
VAR Qone =
IF (
        CONTAINS(MeasureBy; MeasureBy[Selection];"Quantity-EQ") = TRUE ()
     &&
         CONTAINS ( MeasureBydays; MeasureBydays[Selection]; 1 ) = True ();
    CALCULATE(SUM(gpcc_prod_day_analy_rpt_bi[QTY])
         ;FILTER(gpcc_prod_day_analy_rpt_bi
         ;gpcc_prod_day_analy_rpt_bi[Proddt]=TODAY()-1 ));
         0
    )
Return Qone
 
Pervious Measure
 
PPervious =
VAR Qone =
IF (
        CONTAINS(Measureby; Measureby[Selection];"Quantity-EQ") = TRUE ()
     &&
        CONTAINS ( MeasurebyDays; MeasurebyDays[Selection]; 1 ) = True ();
    CALCULATE(SUM(gpcc_prod_day_analy_rpt_bi[QTY])
         ;FILTER(gpcc_prod_day_analy_rpt_bi
         ;gpcc_prod_day_analy_rpt_bi[Proddt]=TODAY()-2));
        0
    )
 
I mapped these two measures in Chart Colume Value , FYI, i tried filter greater than but its not help for my requirement 
 
Chart_property.PNG
 
See the chart view, when i choose selection 2 i get below data but i dont want to show Zero values can you please support.
 
Chart.PNG
2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

Can you just add a RETURN like:

 

IF(__var = 0, BLANK(),__var)

 

?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

Just add measure below to visual level filter and set Show items when the value is greater than 0.

 

Measure 3 =
[Measure] + [Measure 2]

 

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

Just add measure below to visual level filter and set Show items when the value is greater than 0.

 

Measure 3 =
[Measure] + [Measure 2]

 

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

Can you just add a RETURN like:

 

IF(__var = 0, BLANK(),__var)

 

?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Dear

 

Thanks for your respond , but its not worked with my scenario 😞

 

What if you replace your 0 in your measure with BLANK()?

 

Going to be difficult to troubleshoot as the things that should normally work don't seem to be, can you share the file?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Dear

Can you guid me how to upload the file 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors