cancel
Showing results for
Did you mean:

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

Helper I

YTD in Matrix Table

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?

kind regards

Jonas

1 ACCEPTED SOLUTION
Community Support

Hi @JonasDedual  ,

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.

3 REPLIES 3
Community Support

Hi @JonasDedual  ,

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.

Helper I

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

Super User

@JonasDedual , 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.

Announcements

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Power BI Monthly Update - May 2024

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

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors