This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I have a data set with the following fields. The Date field uses the end of month date.
Date , Sales, Sales Target
I want to create a Bar chart that compares Sales, Sales Target, YoY Sales, and Linked period Sales.
How can I calculate YoY and Linked periods?
Lets say a user selects 01/31/15, 02/28/15, and 03/31/15 in the slicer. The bar chart is summing up Sales and Sales Target. I need help getting the YoY and Linked Periods into the bar chart.
In SSRS I could use expressions with Date functions.
Any help would be greatly appreciated.
Thanks,
Tim
My first suggestion is to create a measure to sum up your Sales (etc). Then do a measure for last year sales using DateAdd.
For your sales, it should be something as simple as:
Total Sales = SUM[Sales]
Last Year Sales = CALCULATE([Total Sales], DATEADD(Date[DateKey], -1, year) )
The rest is calculations using those measures
YOY=[Total Sales]-[Last Year Sales]
Generally speaking, however, I tie my date to an order date or an invoice date. Never tried using just the end of the month. PowerBI will pull them into months using slicers for you.
Proud to be a Super User!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 25 | |
| 22 | |
| 14 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 25 | |
| 20 | |
| 20 |