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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
thx1137
Helper I
Helper I

YTD Quarterly Contribution

Good day,

 

Need to come up with a calculation for a YTD Quarterly Sales Contribution by Quarter.

 

I've accomplished the Quarterly Sales Contribution by Quarter by creating a calculated table, and creating a measure that does a LOOKUPVALUE against that table to get the Sales aggregated to a year, then divides that value by the quarterly value in the main table.

 

Now I want to be able to show the YTD of those quarterly contributions.  For example, if Q1-2020 was 10% and Q2-2020 was 15% and Q3-2020 was 20% the YTD that I want to show in Q1-2020 would be 10%, Q2-2020 would be 25%, and Q3-2020 would be 45%.

 

I have another working YTD type calculation on a different table (with an active relationship to a well-formed Date Table declared as a date table) that looks like this and it works fine (we have a 4/1 fiscal start)

YTD Measure = TOTALYTD(Sales, Dates[Date], "3/31")

 

For this new YTD measure, the table it is based on has an inactive relationship with that same well-formed Date Table, so I have this formula:

 

CALCULATE(

     TOTALYTD(

          Revenue, Dates[Date],"3/31"

     ), USERELATIONSHIP(RevenueTable[Date],Dates[Date])

)

 

...but this calculation returns blank values.  Any thoughts?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @thx1137 

Based on your information, I create a sample table:

vyohuamsft_0-1721616836414.png

Then create a new measure and try the following DAX expression:

YTD_Quarterly_Contribution = 
CALCULATE(
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Date] <= MAX('Table'[Date])
        ),
        'Table'[Quarterly Contribution]
    )
)

 

Here is my preview:

vyohuamsft_1-1721616940437.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

3 REPLIES 3
Anonymous
Not applicable

Hi, @thx1137 

Based on your information, I create a sample table:

vyohuamsft_0-1721616836414.png

Then create a new measure and try the following DAX expression:

YTD_Quarterly_Contribution = 
CALCULATE(
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Date] <= MAX('Table'[Date])
        ),
        'Table'[Quarterly Contribution]
    )
)

 

Here is my preview:

vyohuamsft_1-1721616940437.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

Wilson_
Memorable Member
Memorable Member

Can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





DataNinja777
Super User
Super User

Hi @thx1137 ,

This may not be the reason of your formula not working, but your formula above is missing square brackets for Revenue measure which I usually expect to see.  

DataNinja777_0-1721441169563.png

Best regards,

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.