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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Krjen156
New Member

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

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

 










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


Proud to be a Super User!









"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

Hi @Krjen156 ,

Please share a sample file, data or used measures.

 

 

I hope this helps! 
If you found this answer helpful:
✔️ Mark it as the solution to help others find it faster.
 Give it a like to show your appreciation!

Thank you for contributing to our amazing Power BI community! 
danextian
Super User
Super User

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.










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


Proud to be a Super User!









"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.

Done! 

 

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

 










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


Proud to be a Super User!









"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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.