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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Return Amount from same day last week and another filter

I want to be able to get the amount for same day last week from the same store per row, below is a simple illustration. Note: The report I am creating is on import mode. Would appreciate your response!

 

Capture.PNG

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

For your desired output, please try the measure below.

Measure =
VAR max_ =
    MAX ( 'Data'[Date] )
RETURN
    CALCULATE (
        MAX ( 'Data'[Amount] ),
        FILTER (
            ALL ( 'Data' ),
            'Data'[Store] = MAX ( 'Data'[Store] )
                && 'Data'[Date] = max_ - 7
        )
    )

Here is the output.

Capture.PNG

Hope this can help you!Smiley Happy

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
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

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

For your desired output, please try the measure below.

Measure =
VAR max_ =
    MAX ( 'Data'[Date] )
RETURN
    CALCULATE (
        MAX ( 'Data'[Amount] ),
        FILTER (
            ALL ( 'Data' ),
            'Data'[Store] = MAX ( 'Data'[Store] )
                && 'Data'[Date] = max_ - 7
        )
    )

Here is the output.

Capture.PNG

Hope this can help you!Smiley Happy

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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