Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Greetings everyone !
Here's the issue that I am facing.
I have two tables, one for date and other for sales. Slicer is maintain for Month field; data need to be presented as below -
1. Year to date sales based on selected month. i.e. if I have selected June then YTD sum sales till June for each FY.
2. Year over Year, whatever values we have achieved in 1st column needs to compare it with its previous year. i.e. For 2021 = (YTD of 2021 till June - YTD of 2020 till June)/YTD of 2020 till June.
Any ideas how it can be achieve
Hi there.
I recommend the MS learning paths, found here: https://docs.microsoft.com/en-us/learn/browse/?filter-products=BI&products=power-bi
Basically you'd create a measure for the sum, ie. sum = sum( [sales] ), and a measure for the ytd, ie. YTD = yeartodate( [sum], 'Calendar'[Date] ), and a measure for the change:
Var (%) =
var _prev = calculate( [YTD], sameperiodlastyear( 'Calendar'[Date] ))
return
divide( [YTD] - _prev, _prev )
What you are suggesting does not work when there's a slicer on Month in the report. Kindly re-read the query, If I select a month in slicer then YTD should SUM up values only till selected month for each FY i.e. if I select March it should show Jan to March sale for FY21, FY20, FY19 and so on.
I have applied below formula for calculating YTD and its working fine and for YoY below formula is used which is not working -
Kindly suggest if you know how can I correct YoY formula.
Proud to be a Super User!
Oh. Sorry, I've never used YOY myself so thought after quick googling that was the way. Just to make sure, you don't have a table named 'Month', right?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
124 | |
76 | |
74 | |
58 | |
48 |
User | Count |
---|---|
165 | |
83 | |
68 | |
67 | |
55 |