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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX selecting from Quarter Column the current Quarter to find out the QTD.

I have a table with several columns, 1 of them is Quarter and the values are Q1, Q2, Q3, Q4.

I need to fix my DAX to select the current QTD value from the Quarter column in the filter (instead of manually changing them every time).

 

Weekly Pacing Target = Calculate(SUM('TABLE'[Budget])/12, FILTER( TABLE,'TABLE'[Year]=2018 && 'TABLE'[Quarter]="Q3"))
 
So instead of having Q3 there what should I have to automatically take the current Quarter , in this case Q4? 
 
 
Also here:
 
 
TARGETX=
CALCULATE(sum(TABLE[Budget])*
(DATEDIFF(DATE(2022,7,1),TODAY(),DAYDATEDIFF(DATE(2022,7,1),DATE(2022,9,30),DAY)), TABLE[Channel]= "Twitter", TABLE[Quarter] = "Q4", TABLE[Year]=2022)
 
instead of having like to manually choose Quarter and Year i need to it to automatic please someone help.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create measures.

Weekly Pacing Target =
VAR _1 =
    "Q" & QUARTER ( TODAY () )
RETURN
    CALCULATE (
        SUM ( 'TABLE'[Budget] ) / 12,
        FILTER ( TABLE, 'TABLE'[Year] = 2018 && 'TABLE'[Quarter] = _1 )
    )

 

TARGETX =
VAR _1 =
    "Q" & QUARTER ( TODAY () )
RETURN
    CALCULATE (
        SUM ( TABLE[Budget] )
            * (
                DATEDIFF ( DATE ( 2022, 7, 1 ), TODAY (), DAY )
                    / DATEDIFF ( DATE ( 2022, 7, 1 ), DATE ( 2022, 9, 30 ), DAY )
            ),
        TABLE[Channel] = "Twitter",
        TABLE[Quarter] = _1,
        TABLE[Year] = 2022
    )

 

If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.

 

Best Regards

Community Support Team _ Polly

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create measures.

Weekly Pacing Target =
VAR _1 =
    "Q" & QUARTER ( TODAY () )
RETURN
    CALCULATE (
        SUM ( 'TABLE'[Budget] ) / 12,
        FILTER ( TABLE, 'TABLE'[Year] = 2018 && 'TABLE'[Quarter] = _1 )
    )

 

TARGETX =
VAR _1 =
    "Q" & QUARTER ( TODAY () )
RETURN
    CALCULATE (
        SUM ( TABLE[Budget] )
            * (
                DATEDIFF ( DATE ( 2022, 7, 1 ), TODAY (), DAY )
                    / DATEDIFF ( DATE ( 2022, 7, 1 ), DATE ( 2022, 9, 30 ), DAY )
            ),
        TABLE[Channel] = "Twitter",
        TABLE[Quarter] = _1,
        TABLE[Year] = 2022
    )

 

If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.

 

Best Regards

Community Support Team _ Polly

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.