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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
YG78574
Regular Visitor

assign rank to only completed Quarters in FY

I have a monthly data, i need to calculate QoQ, the logic for it is (latest completed quarter- previous completed quarter/previous completed quarter), now for this want to create a new column which assigns rank to only fully completed quarters. Our FY is April to March, the last completed quarter is oct, nov, dec for me now.  i also have jan data but the jan data should not get included in this as the quarter is not yet completed. can anyone guide me in it to make it dynamic as it only gives rank to fully completed quarters. 

3 REPLIES 3
Anonymous
Not applicable

Hi @YG78574

 

For your question, here is the method I provided:

 

Here's some dummy data


"Table"

vnuocmsft_0-1709000412987.png

 

Create a measure to determine completed quarters. This column returns TRUE for the date when the quarter was fully completed.

 

Is Quarter Complete = 
var CurrentQuarter = QUARTER(SELECTEDVALUE('Table'[Date]))
var CurrentYear = YEAR(SELECTEDVALUE('Table'[Date]))
RETURN 
IF(
    CALCULATE(COUNTROWS('Table'), 
        FILTER(
            ALL('Table'), 
            QUARTER('Table'[Date]) = CurrentQuarter 
            && 
            YEAR('Table'[Date]) = CurrentYear
            )
        ) = 3, 
        TRUE,
        FALSE
)
        

 

 

vnuocmsft_1-1709000733597.png

Create measures. Calculate the latest completed quarter amount.

 

CurrentQuarterSales = 
VAR max_date = 
    CALCULATE(
        MAX('Table'[Date]), 
        FILTER(
            ALL('Table'), 
            'Table'[Is Quarter Complete] = TRUE()
        )
    )
RETURN 
CALCULATE(
    SUM('Table'[Values]), 
    FILTER(
        ALL('Table'), 
        QUARTER('Table'[Date]) = QUARTER(max_date)
        )
    )

 

 

vnuocmsft_2-1709000958723.png

 

Calculate the amount of the previous completed quarter.

 

PreviousQuarterSales = 
VAR max_date = 
    CALCULATE(
        MAX('Table'[Date]), 
        FILTER(
            ALL('Table'), 
            'Table'[Is Quarter Complete] = TRUE()
        )
    )
RETURN 
CALCULATE(
    SUM('Table'[Values]), 
    FILTER(
        ALL('Table'), 
        QUARTER('Table'[Date]) = QUARTER(max_date) - 1
        )
    )

 

 

vnuocmsft_3-1709001003725.png

The final result is as follows:

 

QoQ Growth = 
VAR max_date = 
    CALCULATE(
        MAX('Table'[Date]), 
        FILTER(
            ALL('Table'), 
            'Table'[Is Quarter Complete] = TRUE()
        )
    )
VAR CurrentQuarterSale = 
    CALCULATE(
        SUM('Table'[Values]), 
        FILTER(
            ALL('Table'), 
            QUARTER('Table'[Date]) = QUARTER(max_date)
        )
    )

VAR PreviousQuarterSales = 
    CALCULATE(
        SUM('Table'[Values]), 
        FILTER(
            ALL('Table'), 
            QUARTER('Table'[Date]) = QUARTER(max_date) - 1
        )
    )

RETURN DIVIDE(CurrentQuarterSale - PreviousQuarterSales , PreviousQuarterSales)

 

Here is the result.

vnuocmsft_4-1709001108333.png

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

 

[Is QuarterComplete] is not working correctly, it is giving false to completed quaters too.

Anonymous
Not applicable

Hi @YG78574 

 

It's best to provide the pbix file and be careful to remove sensitive data.

 

Regards,

Nono Chen

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.