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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
navneet0512
Helper III
Helper III

Want to calculate Quarter VS Quarter Growth .

I have to calcualte Quarter and Quarter Growth . But major challange is Quarter and year is not in date format.
navneet0512_0-1695650278520.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@navneet0512 , Create a table with Quarter and year

 

Date = summarize(Table, Table[Quarter], Table[Year]_

 

Join back on quarter

 

in new table create rank

 

Qtr Rank = RANKX(all('Date'),'Date'[Quarter],,ASC,Dense)

 

 

and then create measures like
This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))

 

 


Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

View solution in original post

v-binbinyu-msft
Community Support
Community Support

Hi @navneet0512 ,

Please try below steps:

1. create a new table with below dax formula

Table 2 = VALUES('Table'[Quarter])

2. creata a measure with below dax formula

QOQ =
VAR _a =
    SELECTEDVALUE ( 'Table 2'[Quarter] )
VAR _b =
    FILTER ( ALL ( 'Table' ), 'Table'[Quarter] < _a )
VAR _c =
    MAXX ( _b, [Quarter] )
VAR _cur =
    CALCULATE ( MAX ( 'Table'[Units] ), 'Table'[Quarter] = _a, ALL ( 'Table' ) )
VAR _pre =
    CALCULATE ( MAX ( 'Table'[Units] ), 'Table'[Quarter] = _c, ALL ( 'Table' ) )
RETURN
    FORMAT ( DIVIDE ( _cur - _pre, _pre ), "Percent" )

3. add a slicer visual with Table 2 field, add a card visual with measure

Animation24.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

4 REPLIES 4
v-binbinyu-msft
Community Support
Community Support

Hi @navneet0512 ,

Please try below steps:

1. create a new table with below dax formula

Table 2 = VALUES('Table'[Quarter])

2. creata a measure with below dax formula

QOQ =
VAR _a =
    SELECTEDVALUE ( 'Table 2'[Quarter] )
VAR _b =
    FILTER ( ALL ( 'Table' ), 'Table'[Quarter] < _a )
VAR _c =
    MAXX ( _b, [Quarter] )
VAR _cur =
    CALCULATE ( MAX ( 'Table'[Units] ), 'Table'[Quarter] = _a, ALL ( 'Table' ) )
VAR _pre =
    CALCULATE ( MAX ( 'Table'[Units] ), 'Table'[Quarter] = _c, ALL ( 'Table' ) )
RETURN
    FORMAT ( DIVIDE ( _cur - _pre, _pre ), "Percent" )

3. add a slicer visual with Table 2 field, add a card visual with measure

Animation24.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My query is I want to plot this in bar graph and from sclicer I am selecting 2008Q1 and2008Q2 and 2009 Q1 then it must show growth of unit as per selected option from scilicer .

navneet0512
Helper III
Helper III

Re: Quarter over Quarter analysis Analysis - Microsoft Fabric Community Please have look want to know what are mistake I am doing.

amitchandak
Super User
Super User

@navneet0512 , Create a table with Quarter and year

 

Date = summarize(Table, Table[Quarter], Table[Year]_

 

Join back on quarter

 

in new table create rank

 

Qtr Rank = RANKX(all('Date'),'Date'[Quarter],,ASC,Dense)

 

 

and then create measures like
This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))

 

 


Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.