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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yfquirogah
Helper I
Helper I

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:
Captura previous.JPG
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:
 
Capture.JPG
 

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 

2 ACCEPTED SOLUTIONS
v-xiaoyan-msft
Community Support
Community Support

Hi@yfquirogah,

 

Please check if this is what you need.

 

MicrosoftTeams-image.png

 

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-u2QThIoGwtCwj... 

 

 

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.

View solution in original post

yfquirogah
Helper I
Helper I

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.

View solution in original post

4 REPLIES 4
yfquirogah
Helper I
Helper I

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.

v-xiaoyan-msft
Community Support
Community Support

Hi@yfquirogah,

 

Please check if this is what you need.

 

MicrosoftTeams-image.png

 

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-u2QThIoGwtCwj... 

 

 

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.

VijayP
Super User
Super User

@yfquirogah 

Is this what you wanted to have ?!

VijayP_0-1614409472796.png

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


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:

Not solved.JPG

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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