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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
djallarii
Helper I
Helper I

Bar chart to display averages for FYTD, FYPrior, and Month to Date by location?

The end user should be able to select any range and have the chart print all of the Fiscal Year averages and then all of the Month to Date averages by location.

 

So selecting July 1, 2023 to October 31, 2023 should return July through October 2023 by month, July through October 2023 by Fiscal Year and then July 2022 to June 2023 for FY2023.

 

I can use a detached date slicer and flag logic to get the results using a field parameter to switch between the two views. I just can't get them to chart at the time time.

 

image.png

2 REPLIES 2
djallarii
Helper I
Helper I

Thanks for throwing together those measures for me! I was able to get that far but the issue in this case is how to display each measure group as bars on the chart, with labels in the legend.

 

If I use a field parameter with both FYTD and the Month fields, I can get the bars to switch between FYTD and Month... but I need them to show at the same time and within each location grouping.


It's the column chart I attached that I need to reproduce in Power BI.


Example

Group 1 - Location A

Chart column 1 = FYPrior

Chart column 2 = FYCurrent

Chart column 3 = FY Month 1

Chart column 4 = FY Month 2

 

Group 2 - Location B

Chart column 1 = FYPrior

Chart column 2 = FYCurrent

Chart column 3 = FY Month 1

Chart column 4 = FY Month 2

 

amitchandak
Super User
Super User

@djallarii , Based on what I got, You can use datesytd with an end date

// FY ending in june

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

 

 

For selected date you can use

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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