Forum Discussion

Krjen156's avatar
Krjen156
New Member
1 year ago
Solved

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...
  • danextian's avatar
    danextian
    1 year ago

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