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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Stewwe
Helper II
Helper II

Year to Date marker in a date table

Hello everybody,

I have the following problem:

I would like to be able to mark the following values "YTD" in my date table:

1.1.19-19.11.19
1.1.18-19.11.18
1.1.17-19.11.17
etc.

I am very grateful for any idea!

Thank you

Steffen

1 ACCEPTED SOLUTION

Hi @Stewwe ,

You can create the following calculated column in your Date table:

YTD_Today =
VAR monthtoday =
    MONTH ( TODAY () ) * 100
        + DAY ( TODAY () )
VAR monthday =
    MONTH ( 'Calendar'[Date] ) * 100
        + DAY ( 'Calendar'[Date] )
RETURN
    monthtoday > monthday

Then apply this column to the filter and select "True":

11.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ETrs1jCJgbZBs57Bqn... 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-joesh-msft
Solution Sage
Solution Sage

Hi @Stewwe ,

Use DATESYTD or TOTALYTD to change the parameter "year_end_date" to "11/19", the default is December 31.

1.PNG

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-joesh-msft ,

if I want to solve this by measures, your approach is perfectly clear to me.

But what I want is to include the YTD logic in my date dimension in order to be able to filter through various measures.

According to my logic, a calculated column must mark all date entries up to today's date.

I hope my question became a little clearer.

Bye

Steffen

Hi @Stewwe ,

You can create the following calculated column in your Date table:

YTD_Today =
VAR monthtoday =
    MONTH ( TODAY () ) * 100
        + DAY ( TODAY () )
VAR monthday =
    MONTH ( 'Calendar'[Date] ) * 100
        + DAY ( 'Calendar'[Date] )
RETURN
    monthtoday > monthday

Then apply this column to the filter and select "True":

11.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ETrs1jCJgbZBs57Bqn... 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much @v-joesh-msft . I am completely thrilled by the simplicity of the formula.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.