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 visual

I'm having an issue with a couple visuals. I have a measure which counts the amount of "entries":

Cant. Ingresos = COUNTROWS('Altas_2019-2020')+0

The 0 at the end I had to use it for the chart to plot the 0 when there is no entries or data in an specific month instead of the line going straight to the next available point. Kind of what happens in this problem: https://community.powerbi.com/t5/Desktop/Plot-zero-when-there-is-no-data-in-line-chart/td-p/506235

 

Right now the plot looks like this:

 

Total dates.jpg

Is already plotting 0 for the rest of the year even though it has not even been loaded yet. This I kind of understand why is happening and as a last resource I think I'll just put a filter for the whole page and take out the months that havent been updated yet (it would be an inconvinience because it would requeire for me to manually change that part every month but OK).

The weird thing happens when I use the slicer to select one specific year, if I select 2020 for example this is what it shows:

 

2020.jpg

Everything before and after 2020 goes to 0 instead of just removing it from the chart. Ever since I put the 0 to plot when there is no data is doing this but now I don't know how to fix it and still do what I need it to do.

 

I would appreciate any suggestion. Thank you in advance.

 

6 REPLIES 6
v-yuaj-msft
Community Support
Community Support

Hi @yfquirogah ,

 

Could you please share your screenshot of  your line chart's field with me? What's the relationship between two tables?

Actually I did a test, but I cannot reproduce your issue. Please check my steps if there is anything different?

ps. I used the same measure as you shared before.

022202.gif

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Yuna

 

I had to repost the problem, for some reason I wasnt able to respond to the post until now. Please go to this link https://community.powerbi.com/t5/Desktop/Slicer-not-removing-dates-from-plot/m-p/1693351#M672949 there you can find the .pbix, I was able to reproduce the issue.

 

parry2k
Super User
Super User

@yfquirogah do you have a separate table for a date that you are using on the x-axis? if not then you need to add a date dimension and use that on the x-axis and on the slicer. Link to how to add date dimension to your model.

 

 

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I have a Calendar table, is connected to the entries table by the date. From the calendar table I'm using the year and month Hierarchy as the x-axis and the year field on the calendar table is the one I used on the slicer.

parry2k
Super User
Super User

@yfquirogah because you have plus zero and that's the reason it is showing the value, if you remove +0 it will work.

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Yes, I know thats the reason why because since I put it, it started to have this issues, but as I mentioned there it was the only way I found for the graphic to show when there is no entries instead of just skip the value and plot it as if it was a straight line. Is basically this same case, in which I found the +0 solution (https://community.powerbi.com/t5/Desktop/Plot-zero-when-there-is-no-data-in-line-chart/td-p/506235)

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.