Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi
I am trying to use YTD in a Matrix table.
On the Y Axis, I have Main product Group, Product Group and Product.
On the X Axis I have the Years.
The Problem I am currently facing is to add YTD on the X Axis for each year. Any suggestions how to solve this issue?
Thanks in Advancce!
kind regards
Jonas
Solved! Go to Solution.
Hi @Anonymous ,
Please refer to this:
https://community.powerbi.com/t5/Desktop/SAMEPERIODLASTYEAR-with-a-year-filter/td-p/91501
If the problem persists,could you share the sample pbix with dummy data?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please refer to this:
https://community.powerbi.com/t5/Desktop/SAMEPERIODLASTYEAR-with-a-year-filter/td-p/91501
If the problem persists,could you share the sample pbix with dummy data?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
Yes, I with YTD I mean the period for each year:
1.1.2021 - 30.04.2021
1.1.2020 - 30.04.2020
1.1.2020 - 30.04.2019
.....
However I am quite confused about the date table with your comment:
"For that create a date table, join date of date with order date. Add year to date table and use that year in visual"
Im not really sure what needs to be in that date table. I have created something like that but I doubt that this is correct:
Date = SUMMARIZE('Lian CH$Sales Invoice Line','Lian CH$Sales Invoice Line'[Order Date].[Date], 'Lian CH$Sales Invoice Line'[Order Date].[Year],'Lian CH$Sales Invoice Line'[Order Date].[Month],'Lian CH$Sales Invoice Line'[Order Date].[Day])
@Anonymous , what to mean by ytd here, each year only till April ?
For that create a date table, join date of date with order date. Add year to date table and use that year in visual
Create measure like
YTD Corrected =
var _max = format(today(),"MMDD")
return
calculate(Sum('Table'[AmountNoavt]),DATESYTD('Date'[Date]),format('Date'[Date],"MMDD")<=_max)
or
YTD Corrected =
var _max = format(today(),"MMDD")
return
if(format(max('Date'[Date]),"MMDD")<=_max, calculate(Sum('Table'[AmountNoavt]),DATESYTD('Date'[Date])),blank())
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
77 | |
62 | |
47 | |
39 |
User | Count |
---|---|
118 | |
85 | |
80 | |
58 | |
40 |