Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Return Different Column Value in Same Row Context after CALCULATE

Hi all, I hope everyone is doing well. I am new to PowerBI and am currently working with Salesforce data to analyze historical opportunity changes. The data I am currently working on looks something...
  • tamerj1's avatar
    4 years ago

    Hi Anonymous 

    please use

    NextStageCreatedDate =
    VAR CurrentIndex = 'Opportunity History'[Indexnew]
    RETURN
        CALCULATE (
            MIN ( 'Opportunity History'[StageName] ),
            ALLEXCEPT ( 'Opportunity History', 'Opportunity History'[OpportunityId] ),
            'Opportunity History'[Indexnew] = currentindex - 1
        )