Forum Discussion
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.
7 Replies
- Jihwan_KimSuper 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
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 ) )- AnonymousNot applicable
Using the above gives me the error "A Circular Dependency was detected"
- Jihwan_KimSuper User
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.
- AnonymousNot applicable
Hi Anonymous,
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- AnonymousNot applicable
Hi Anonymous,
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- AnonymousNot 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