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

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

Top Solution Authors