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

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
Super User
Super User

Can you just add a RETURN like:

 

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

 

?


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-chuncz-msft
Community Support
Community Support

@Rksudhuman ,

 

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

@Rksudhuman ,

 

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
Super User
Super User

Can you just add a RETURN like:

 

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

 

?


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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?


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Dear

Can you guid me how to upload the file 

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.