Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
can you please assist on how do i calculate the % change between previous and current quarters in power bi
Solved! Go to Solution.
HI @Anonymous,
You can use year and quarter functions to extract the year and quarter numbers from the date field value, then you can use them in expression to get corresponding current and previous quarter values to calculate the diff.
formual =
VAR currDate =
MAX ( Table[Date] )
VAR prevDate =
DATE ( YEAR ( currDate ), MONTH ( currDate ) - 3, DAY ( currDate ) )
VAR currQuarter =
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( Table[Date] ) = YEAR ( currDate )
&& QUARTER ( Table[Date] ) = QUARTER ( currDate )
),
VALUES ( Table[Category] )
)
VAR prevQuarter =
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( Table[Date] ) = YEAR ( prevDate )
&& QUARTER ( Table[Date] ) = QUARTER ( prevDate )
),
VALUES ( Table[Category] )
)
RETURN
DIVIDE ( currQuarter - prevQuarter, prevQuarter )
Regards,
Xiaoxin Sheng
HI @Anonymous,
You can use year and quarter functions to extract the year and quarter numbers from the date field value, then you can use them in expression to get corresponding current and previous quarter values to calculate the diff.
formual =
VAR currDate =
MAX ( Table[Date] )
VAR prevDate =
DATE ( YEAR ( currDate ), MONTH ( currDate ) - 3, DAY ( currDate ) )
VAR currQuarter =
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( Table[Date] ) = YEAR ( currDate )
&& QUARTER ( Table[Date] ) = QUARTER ( currDate )
),
VALUES ( Table[Category] )
)
VAR prevQuarter =
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( Table[Date] ) = YEAR ( prevDate )
&& QUARTER ( Table[Date] ) = QUARTER ( prevDate )
),
VALUES ( Table[Category] )
)
RETURN
DIVIDE ( currQuarter - prevQuarter, prevQuarter )
Regards,
Xiaoxin Sheng
@Anonymous read this full article:
https://www.daxpatterns.com/standard-time-related-calculations/
You also have there a section about quarter over quarter.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |