Reply
Krjen156
New Member
Partially syndicated - Outbound

Time Intelligence. Quarter and Last Quarter

Hello! 

I'm trying to create a report of financial statements. The most recent data is from Q3 (2024-09-31).

My datetable contains data from 2020-01-01 to 2024-12-31. I've created a calculation group containing "Quarter", "Last Quarter" and "Quarter Over Quarter". The problem occurs when I filter on "Last Quarter"- then the same value as "quarter" shows because todays date is in Q4, and it shows last quarter which is Q3 (but I want Q2 to show because there is no data for Q4 yet.

 

Any suggestions on how I can solve this? 





 

1 ACCEPTED SOLUTION

Syndicated - Outbound

I honestly don't get the reasoning behind why you want to show the data from 2 quarters ago for LQ if the latest quarter is blank but here you go

LQ =
VAR Q =
    CALCULATE ( SELECTEDMEASURE (), DATESQTD ( 'Date'[Date] ) )
VAR _Count =
    IF ( ISBLANK ( Q ), -2, -1 )
RETURN
    CALCULATE (
        SELECTEDMEASURE (),
        DATEADD ( DATESQTD ( 'Date'[Date] ), _Count, QUARTER )
    )

danextian_0-1734351884657.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
Bibiano_Geraldo
Super User
Super User

Syndicated - Outbound

Hi @Krjen156 ,

Please share a sample file, data or used measures.

 

 

danextian
Super User
Super User

Syndicated - Outbound

Hi @Krjen156 

What measures did  you use? How does your model look? Also, please post a workable sample data (not an image) and your expected result from that with the reasoning.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Syndicated - Outbound

Done! 

 

Syndicated - Outbound

I honestly don't get the reasoning behind why you want to show the data from 2 quarters ago for LQ if the latest quarter is blank but here you go

LQ =
VAR Q =
    CALCULATE ( SELECTEDMEASURE (), DATESQTD ( 'Date'[Date] ) )
VAR _Count =
    IF ( ISBLANK ( Q ), -2, -1 )
RETURN
    CALCULATE (
        SELECTEDMEASURE (),
        DATEADD ( DATESQTD ( 'Date'[Date] ), _Count, QUARTER )
    )

danextian_0-1734351884657.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)