Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone,
I have data for 8 quarters (but the format of the quarter variable in the data is text, not a date).
I'm looking to make a dynamic calculation depending on what quarter I pick in the filter, that it will compare this quarters score to the previous quarters score.
For example, here I have clicked Q2 2023 in my filter. The score for Q2 2023 is 11. I now want a KPI that would show +5, since the score for Q1 2023 was 6.
If I chose Q3 2023 in the filter, I would want the KPI to show -3, since Q2 2023 is 11.
I just always want the quarter selected to compare to the quarter before it. But since the quarters are listed as text options within one Quarter variable, I'm not sure how to acheive.
(This would be a table calculation in Tableau but not sure how to translate here).
Thanks!
Hey @ssh529 ,
You can try something like the Comparioson Measure bellow. It's a simple starting point that can be refined to meet your specific requirements. Just make sure to replace 'YourTable' with your actual table name and 'YourValueColumn' with the name of the column containing the values you want to compare.
Comparison Measure =
VAR CurrentQuarter = SELECTEDVALUE('YourTable'[Quarter]) // Replace 'YourTable' with your table name
VAR PreviousQuarter =
IF(
CurrentQuarter = "Q1",
"Q4",
CONCATENATE("Q", TEXT(VALUE(RIGHT(CurrentQuarter, 1)) - 1))
)
RETURN
CALCULATE(
SUM('YourTable'[YourValueColumn]), // Replace 'YourValueColumn' with your value column name
'YourTable'[Quarter] = PreviousQuarter
)
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.