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
RilwanFlame
Helper III
Helper III

DAX quarter Calculation Difference

Hi All-- 

 I would expect the highlighted amount to be the difference between Q4 & Q1 = 29,251 – 28,723 = $528. 

 

Below is my code.

RilwanFlame_0-1651588410852.png

 

QoQ $ $ =
IF(
    ISFILTERED('ICC Reports'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_QUARTER = CALCULATE(SUM('ICC Reports'[$]), DATEADD('ICC Reports'[Date].[Date], -1, QUARTER))
    RETURN
        DIVIDE(SUM('ICC Reports'[$]) - __PREV_QUARTER, __PREV_QUARTER)
)
 
Thank you
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

That's working out the percentage. Try

QoQ $ $ =
IF(
    ISFILTERED('ICC Reports'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_QUARTER = CALCULATE(SUM('ICC Reports'[$]), DATEADD('ICC Reports'[Date].[Date], -1, QUARTER))
    RETURN
        SUM('ICC Reports'[$]) - __PREV_QUARTER
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

That's working out the percentage. Try

QoQ $ $ =
IF(
    ISFILTERED('ICC Reports'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_QUARTER = CALCULATE(SUM('ICC Reports'[$]), DATEADD('ICC Reports'[Date].[Date], -1, QUARTER))
    RETURN
        SUM('ICC Reports'[$]) - __PREV_QUARTER
)

Thankk you so much.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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