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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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)

 

?


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!:
The Definitive Guide to Power Query (M)

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)

 

?


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!:
The Definitive Guide to Power Query (M)

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?


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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Dear

Can you guid me how to upload the file 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.