Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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).
Solved! Go to Solution.
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.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
15 | |
11 | |
11 | |
10 |