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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
dax
Community Support
Community Support

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.

View solution in original post

8 REPLIES 8
dax
Community Support
Community Support

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

336.PNG337.PNG

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.

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

Anonymous
Not applicable

@dax 

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

By the way, what was the second measure for?

 

dax
Community Support
Community Support

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.

Anonymous
Not applicable

@amitchandak 

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

I already had the fiscal year and quarter column.

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 )

 

 

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...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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