cancel
Showing results for
Did you mean:
Highlighted
Post Patron

## need help to calculate quarter over quarter

hi all,

i had the current quarter column but need help on dax for the fiscal quarter over previous year fiscal quarter?

my fiscal year start april. can anyone advice?

https://gofile.io/?c=DiLcbX

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support

## Re: need help to calculate quarter over quarter

Hi mellyVK,

When you use first one in table, it won't calculate grand total automatically, so you could use second measure in table which will show grand total in table.

Best Regards,
Zoe Zhi

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

8 REPLIES 8
Highlighted
Super User IX

## Re: need help to calculate quarter over quarter

Check if this can help

https://community.powerbi.com/t5/Desktop/Creating-a-Fiscal-Year-amp-Fiscal-Quarter-in-a-DATE-calenda...

Proud to be a Super User!

Highlighted
Post Patron

## Re: need help to calculate quarter over quarter

Thanks, but how do i calculate the quarter over quarter?

Highlighted
Super User IX

## Re: need help to calculate quarter over quarter

See if my Time Intelligence the Hard Way provides a way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Highlighted
Super User IX

## Re: need help to calculate quarter over quarter

Please create a separate time table. Please find my calc for last year same Qtr

```Last year same Qtr Sales =
var _year = (max('OrderTime'[Order Year])-1)&""
var _qtr = max('OrderTime'[Order Qtr Name])
var _min_date = Minx(FILTER(all(OrderTime),OrderTime[Order Year]=_year && OrderTime[Order Qtr Name]=_qtr),
OrderTime[Order Date])
var _max_date = MAXx(FILTER(all(OrderTime),OrderTime[Order Year]=_year && OrderTime[Order Qtr Name]=_qtr),
OrderTime[Order Date])
return CALCULATE(SUM(Sales[Sales]),OrderTime[Order Date]>= _min_date && OrderTime[Order Date]<= _max_date )```

Proud to be a Super User!

Highlighted
Community Support

## Re: need help to calculate quarter over quarter

Hi mellyVK,

You could try below measure

```Last year same Qtr Sales =
CALCULATE (
SUM ( DATA1[Value] ),
FILTER (
ALL ( DATA1 ),
DATA1[Product] = MIN ( DATA1[Product] )
&& DATA1[fiscalyearquarterno] = MIN ( DATA1[fiscalyearquarterno] )
&& DATA1[FinancialYearNo]
= MIN ( DATA1[FinancialYearNo] ) - 1
)
)
```
```Measure =
IF (
HASONEVALUE ( DATA1[fiscalquarter] ),
[Last year same Qtr Sales],
SUMX (
SUMMARIZE (
DATA1,
DATA1[Product],
DATA1[fiscalquarter],
"test", [Last year same Qtr Sales]
),
[test]
)
)
```

Then use measure in table or visual

Best Regards,
Zoe Zhi

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

Highlighted
Post Patron

## Re: need help to calculate quarter over quarter

I used the first one and it works perfectly! Thanks so much.

By the way, what was the second measure for?

Highlighted
Community Support

## Re: need help to calculate quarter over quarter

Hi mellyVK,

When you use first one in table, it won't calculate grand total automatically, so you could use second measure in table which will show grand total in table.

Best Regards,
Zoe Zhi

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

Highlighted
Regular Visitor

## Re: need help to calculate quarter over quarter

After intensive struggle found this as the best and easiest way. All others have provided the fiscal week or quarter comparisions but when try to filter with any of the categories or dimensions the sales values will not change and remain the same as whole. THis worked amazingly

Announcements

#### Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

#### Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021