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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everybody,
I have an issue with the previous quarter function.
I try to compare revenue from current quarter with previous quarter but I don't have any amount calculated for previousquarter.
So, I guess my formula is wrong. Could someone please help me?
CA_PreviousQuarter =
-calculate(
sum('Xyz$G_L Entry'[Amount]);
previousquarter(Calendrier[Date]);
FILTER('Xyz$G_L Entry';
'Xyz$G_L Entry'[G_L Account No_] IN {700000}
&& NOT ('Xyz$G_L Entry'[Source Code] IN {"CPTACLGEST"})
&& NOT ('Xyz$G_L Entry'[Global Dimension 1 Code] IN {"901Admin";"911IT";"921Fin";"931Dir";"941Mkt";"902HORSEXPL"})))
Have a nice day
Hi @Anonymous ,
try this
CA =
- CALCULATE (
SUM ( 'Xyz$G_L Entry'[Amount] );
FILTER (
'Xyz$G_L Entry';
'Xyz$G_L Entry'[G_L Account No_] IN { 700000 }
&& NOT ( 'Xyz$G_L Entry'[Source Code] IN { "CPTACLGEST" } )
&& NOT ( 'Xyz$G_L Entry'[Global Dimension 1 Code]
IN { "901Admin"; "911IT"; "921Fin"; "931Dir"; "941Mkt"; "902HORSEXPL" } )
)
)
CA_PreviousQuarter =
CALCULATE ( [CA]; DATEADD ( Calendrier[Date]; -1; QUARTER ) )
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
@mwegener thanks for your answer.
I now have information on my CApreviousquarter but the information is not relevant.
Filters selected on my report are :
- Year
- Month
So, if I choose 2020 and January, I would like to have the revenue for 2020 January AND the revenue of the previous quarter divided by 3 in comparison.
But the previous quarter revenue is not the expected amount...
What is wrong?
Hi @Anonymous
Hi @Anonymous ,
try this..
CA (last 3 months) =
CALCULATE (
[CA];
DATESINPERIOD ( Calendrier[Date]; MIN ( Calendrier[Date] ) - 1; -3; MONTH )
)
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 125 | |
| 108 | |
| 46 | |
| 29 | |
| 27 |