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
CiaraCaryl
Frequent Visitor

PYTD / YOY QTD formula issue

I have data that is only giving a quarterly date so the typical PYTD calculation is not working due to the time intelligence. I am trying to use this formula below but am getting an error saying "STARTOFQUARTER" is not of type DATE" What can I do from here? Or can anyone point out an issue with this formula or provide a better functioning formula?

YoY PQTD =
    // Current Quarter To Date
    VAR CurrentQTD =
        CALCULATE (
            SUM (OWSSummaryByQuarterByEU[channel_licenses_net_added] ),
            // Filter for the current quarter
            FILTER (
                OWSSummaryByQuarterByEu,
                 OWSSummaryByQuarterByEu[quarter].[Date]>= STARTOFQUARTER('EU Report'[Today])
                && OWSSummaryByQuarterByEu[quarter].[Date] <= TODAY()
            )
        )
    // Previous Year's Same Quarter To Date
    VAR PreviousYearQTD =
        CALCULATE (
            SUM (OWSSummaryByQuarterByEU[channel_licenses_net_added]),
            // Filter for the same quarter of the previous year
            FILTER (
                OWSSummaryByQuarterByEu,
                OWSSummaryByQuarterByEu[quarter].[Date] >= STARTOFQUARTER ( DATEADD ( 'EU Report'[Today], -1, YEAR ) )
                && OWSSummaryByQuarterByEu[quarter].[Date] <= DATEADD ( 'EU Report'[Today], -1, YEAR )
            )
        )
    // Return the YoY difference
    RETURN
        ( CurrentQTD - PreviousYearQTD ) / ABS ( PreviousYearQTD )




CiaraCaryl_0-1742406002497.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

I have data that is only giving a quarterly date so the typical PYTD calculation is not working due to the time intelligence. 

Add a derived date column to your fact table (for example the first day of the quarter).  Link that to your calendar dimension.  Use the time intelligence functions.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @CiaraCaryl ,
We haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Anonymous
Not applicable

Hi @CiaraCaryl ,
I just wanted to kindly follow up to see if you had a chance to review the previous response provided by community members. I hope it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.
Thank you.

Anonymous
Not applicable

Hi @CiaraCaryl ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your solution. It would be greatly appreciated by others in the community who may have the same question.
Thank you.

lbendlin
Super User
Super User

I have data that is only giving a quarterly date so the typical PYTD calculation is not working due to the time intelligence. 

Add a derived date column to your fact table (for example the first day of the quarter).  Link that to your calendar dimension.  Use the time intelligence functions.

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.