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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gsherbon
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
amitchandak
Super User
Super User

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.
Tahreem24
Super User
Super User

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!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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