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

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

Reply
CiaraCaryl
Frequent Visitor

Help with Last Quarter Formula

I calculated the sum for last quarter and last quarter previous year but they only work when I plot them against a time period.

I am trying to plot it against customer name instead and the measures just return blanks.

My data has sums of activity by quarterly dates only, not daily. 

These are my measures that are working but only if plotted against date logic.

Net Added Last Quarter = CALCULATE(SUM(OWSSummaryByQuarterByEU[channel_licenses_net_added]), PREVIOUSQUARTER(OWSSummaryByQuarterByEu[End of Quarter].[Date]))
Net Added Last Quarter Prior Year = CALCULATE([Net Added Last Quarter], SAMEPERIODLASTYEAR(OWSSummaryByQuarterByEU[End of Quarter].[Date]))
 
Does anyone have a formula that would give me the sum of last quarter when not plotted against time?
I'm assuming it needs to be a calculated column but everything I try is returning blank or error. 
Willing to try DAX or Power Query solutions.  
7 REPLIES 7
Anonymous
Not applicable

Hi @CiaraCaryl,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Anonymous
Not applicable

Hi @CiaraCaryl,

 

May I ask if you have gotten this issue resolved?

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Vinay Pabbu

Anonymous
Not applicable

Hi @CiaraCaryl,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I tried to use INDEX DAX function in the measure.

 

INDEX function (DAX) - DAX | Microsoft Learn

 

Jihwan_Kim_1-1743439069269.png

 

 

Jihwan_Kim_0-1743439056064.png

 

Latest YearQuarter Sales: =
VAR _latestquarter =
    INDEX (
        1,
        FILTER (
            ALL ( 'calendar'[Year-Quarter] ),
            CALCULATE ( SUM ( sales[sales] ) ) <> BLANK ()
        ),
        ORDERBY ( 'calendar'[Year-Quarter], DESC )
    )
RETURN
    CALCULATE (
        SUM ( sales[sales] ),
        KEEPFILTERS ( 'calendar'[Year-Quarter] = _latestquarter )
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Using the above gives me the error "A Circular Dependency was detected"

Anonymous
Not applicable

Hi @CiaraCaryl,

 

Please have a look at this link to resolve circular dependency

https://learn.microsoft.com/en-us/answers/questions/1095117/circular-dependency-detected-on-resource 

 

Regards,

Vinay Pabbu

Hi,

Thank you for your reply, and please share your sample pbix file's link here, and then I can try to look into it.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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