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

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

Reply
Jouni900
Frequent Visitor

YTD for Average

Hi,

 

I have a target on a monthly level for which I would want to calculate YTD. My source data is on a daily level so in order to get correct monthly target, I have taken AVERAGE from the target value. The problem however comes when I would like to get YTD, let's say on a two month period in the example below, 110.

 

I have calculated the target which works for an individual month using the formula below

Category FCST = CALCULATE(AVERAGE('SKU Daily Data 2021-2022 - ÄLÄ'[Category FCST]))

 

How I would be able to extend the YTD for multiple periods?    

 

MonthDateTarget
112350
1123450
11234550
223460
2234560
2234660

  

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Jouni900 

 

If I understand it correctly, you can try the following measure for the monthly YTD. It sumx your [Category FCST] measure. 

YTD =
SUMX (
    FILTER (
        ALL ( 'SKU Daily Data 2021-2022 - ÄLÄ'[Month] ),
        'SKU Daily Data 2021-2022 - ÄLÄ'[Month]
            <= MAX ( 'SKU Daily Data 2021-2022 - ÄLÄ'[Month] )
    ),
    [Category FCST]
)

vjingzhang_0-1676428475645.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
Jouni900
Frequent Visitor

@v-jingzhang  Thank you, it worked like a charm!

v-jingzhang
Community Support
Community Support

Hi @Jouni900 

 

If I understand it correctly, you can try the following measure for the monthly YTD. It sumx your [Category FCST] measure. 

YTD =
SUMX (
    FILTER (
        ALL ( 'SKU Daily Data 2021-2022 - ÄLÄ'[Month] ),
        'SKU Daily Data 2021-2022 - ÄLÄ'[Month]
            <= MAX ( 'SKU Daily Data 2021-2022 - ÄLÄ'[Month] )
    ),
    [Category FCST]
)

vjingzhang_0-1676428475645.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.