Forum Discussion

yfquirogah's avatar
yfquirogah
Helper I
5 years ago
Solved

Slicer not removing dates from plot

I had to repost this issue because for some reason I wasn't able to respond to the original post to continue the trend 😕

So, here it goes again: Initially I was having an issue with the line chart, it was not plotting 0 when there was no data and instead was going straigth to the next available point making it look like there was always data:
I added a +0 at the end of the formula (it was the solutions I found in a similar post) but this triggered another problem, it's plotting 0 before and after the time frame selected in the slicer:
 
 

I have tried different formulas but still have not been able to make it work. If you have any idea on how to approach this it would be really helpfull! This time I brought a lot more info, here you can find the .pbix, I was able to recreate the issue.

https://drive.google.com/file/d/1eqf9Nmh9IJs9DwVJInRnU1R7j9RcFM4t/view?usp=sharing

 

I appreciate any help you can give me with this problem! Greg_Deckler amitchandak parry2k 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hiyfquirogah,

     

    Please check if this is what you need.

     

     

    you can try like this : 

    Amount New_Hires = IF(ISBLANK(SUM(New_Hires[Entries])),0,SUM(New_Hires[Entries]))

     

    Here is the demo : https://qiuyunus-my.sharepoint.com/:u:/g/personal/admin_qiuyunus_onmicrosoft_com/EeDbc-u2QThIoGwtCwjyPl4B0PEufZiQFON2SRX2kJW1Jw?e=WpviAf 

     

     

    Hope it helps.

     

    Best Regards,
    Caitlyn Yan

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

  • I was finally able to find the answer to this problem:

    Cant. Ingresos = 
    var _Ingresos = COUNTROWS('Altas_2019-2020')+0
    var _min = MINX(ALLSELECTED(Calendario);Calendario[Date])
    var _max = MAX('FTE_2019-2020'[Fecha extracción])

    return
    CALCULATE(IF(MAX(Calendario[Date])<_min||MIN(Calendario[Date])>_max;BLANK();_Ingresos))

    With this measure I was able to make the chart plot the 0 but still keep the range within the selected dates.

     

    Thanks for your help.

4 Replies

    • yfquirogah's avatar
      yfquirogah
      Helper I

      Not exactly, I tried the measure you recommended but the problem is still there, if you filter one of the smallest Entities such as Legal this is what it plots:

      It plots a straight line on 1 that would suggest every month there was one entry, it should go to 0 from Feb - Apr because there was no data there meaning there were no entries.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hiyfquirogah,

     

    Please check if this is what you need.

     

     

    you can try like this : 

    Amount New_Hires = IF(ISBLANK(SUM(New_Hires[Entries])),0,SUM(New_Hires[Entries]))

     

    Here is the demo : https://qiuyunus-my.sharepoint.com/:u:/g/personal/admin_qiuyunus_onmicrosoft_com/EeDbc-u2QThIoGwtCwjyPl4B0PEufZiQFON2SRX2kJW1Jw?e=WpviAf 

     

     

    Hope it helps.

     

    Best Regards,
    Caitlyn Yan

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

  • I was finally able to find the answer to this problem:

    Cant. Ingresos = 
    var _Ingresos = COUNTROWS('Altas_2019-2020')+0
    var _min = MINX(ALLSELECTED(Calendario);Calendario[Date])
    var _max = MAX('FTE_2019-2020'[Fecha extracción])

    return
    CALCULATE(IF(MAX(Calendario[Date])<_min||MIN(Calendario[Date])>_max;BLANK();_Ingresos))

    With this measure I was able to make the chart plot the 0 but still keep the range within the selected dates.

     

    Thanks for your help.