Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Count days in single column until reference ID appears again

Hello,

I am new to powerBI and i am trying to create a calculated column that counts the active days until the same reference ID appears again in the table then stops counting.

 

Desired outcome is the Days active column as below.

 

I have looked through the forums and found something close

but it creates the value to the next row as days between and im not clear how to alter the DAX to give the desired outcome.

 

Reference NumberDate SubmittedStage NumberDays Active
101/01/2021161
102/02/2021263
103/03/20213 170

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Logic should be to count untill a stage number is => current stage number with matching Ref ID.

      • v-easonf-msft's avatar
        v-easonf-msft
        Icon for Community Support rankCommunity Support

        Hi,  Anonymous 

        I am sorry that your explanation has confused me even more, can you provide more data for research?

        Best Regards,
        Community Support Team _ Eason