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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

previous quarter - no data shown

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

 

5 REPLIES 5
mwegener
Most Valuable Professional
Most Valuable Professional

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 ) )

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

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


Anonymous
Not applicable

@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 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case and help the other members find it more quickly?
If not, please feel free to let me know.
For example, for 2020 January, the expected result of the previous quarter should be ( data for 2019/10, 2019/11, 2019/12)/3
for 2020 April, the expected result should be (data for 2020/1, 2020/2, 2020/3)/3,
Right?
 
Best Regards
Maggie
Anonymous
Not applicable

Hi @v-juanli-msft  that's exactly what I would like...

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

try this..

CA (last 3 months) =
CALCULATE (
    [CA];
    DATESINPERIOD ( Calendrier[Date]; MIN ( Calendrier[Date] ) - 1; -3; MONTH )
)

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

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


Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.