cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Need to show by graph by month only up to the month selected in a slicer

I have a summary P&L I'm putting into a tab that shows the results for selected month vs budget & prior as well as YTD results for the same.  

 

I have slicers for Year, Quarter, and Month.

 

Underneath I want to be able to show Gross Profit by month vs last year in a bar graph.  But I want that bar graph to show each month leading up to the month selected in the slicer (so if I select June, I want to see all 6 months of the year, not just June).  How do I do this?

1 ACCEPTED SOLUTION

@gsherbon 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/Chart-to-display-value-from-year-beginning-to-till-the-slic...

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

4 REPLIES 4
Super User IV
Super User IV

Is that not happening with totalytd and datesytd ?

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date])))

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year)))

 Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Maybe I misstated.  I'm looking for the ability to show Gross Profit by Month by only selecting the final month in my slicer.  I don't need for it to be cumulative.

@gsherbon 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/Chart-to-display-value-from-year-beginning-to-till-the-slic...

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

Super User II
Super User II

If you want to show a bar chart as per selected slicer value so I recommend you to use the relative slicer and enter a value like last 6 months etc.

Just take slicer from visualisation pane then click on down arrow on slicer (right top corner) like this "v" and then select relative filter option. After that select value according to your requirements.

Don't forget to give Thumb Up and accept this as a solution if it helps you.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
You can follow me on LinkedIn
Please take a quick glance at newly : HR Analytics Report , Hotel Management Report, and Sales Analysis Report

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors