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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

YTD calculations without date table

Hi 

 

I don't have date column in my data set but i have period(month) like 1,2,3...12. how can i do YTD calculations without having dates. 

I want to create a graph visual of YTD by sales organisation. 

 

Thanks,

Paruchuri

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

YTD is all months until the one selected, so something like this would work:

Measure YTD =
VAR SelectedMonth =
    MAX ( Table[Period] )
RETURN
    CALCULATE (
        [Measure],
        FILTER ( ALL ( Table[Period] ), Table[Period] <= SelectedMonth )
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
Stachu
Community Champion
Community Champion

YTD is all months until the one selected, so something like this would work:

Measure YTD =
VAR SelectedMonth =
    MAX ( Table[Period] )
RETURN
    CALCULATE (
        [Measure],
        FILTER ( ALL ( Table[Period] ), Table[Period] <= SelectedMonth )
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Hi Stachu,

 

Thanks for your reply. In calculate function you have used [Measure]. What it is refering to?

Stachu
Community Champion
Community Champion

you should replace it with whatever measure you want to calculate, e.g. 

SUM(Table[Column])


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors