Forum Discussion

Bhuvaraghan's avatar
Bhuvaraghan
Frequent Visitor
5 years ago
Solved

Getting previous week Value in Sales report

Hi All,

 

I am preparing a sales report where I want to show accounts which moved from one stage to another in the previous week.

WeekStageAccount NamePrevious Week
10/16/2020Proposal SubmittedABC-
10/16/2020DiscoveryXYZ-
10/23/2020Contract NegoticationABCProposal Submitted
10/23/2020DiscoveryXYZDiscovery
10/30/2020WonABCContract Negotication
10/30/2020Proposal SubmittedXYZDiscovery

 

I want to calculate the Previous week column using DAX. Any help is appreciated. If I need to create any helper columns to identify previous week also, I can do.

 

Thanks,

Bhuvaraghan

4 Replies

  • Icey's avatar
    Icey
    Icon for Community Support rankCommunity Support

    Hi Bhuvaraghan ,

     

    You can also create a column like so:

    Column =
    CALCULATE (
        MAX ( 'Table'[Stage] ),
        FILTER (
            'Table',
            'Table'[Account Name] = EARLIER ( 'Table'[Account Name] )
                && 'Table'[Week]
                    = EARLIER ( 'Table'[Week] ) - 7
        )
    )
    

     

    It works the same as what amitchandak provided.

     

     

    Best regards

    Icey

     

    If this post helps,then consider Accepting it as the solution to help other members find it faster.