Forum Discussion

Ratax's avatar
Ratax
Icon for Helper I rankHelper I
8 years ago
Solved

Counter that resets

Hi all

Is it possible to make a counter that reset when something is logged in another column?
The company run sticks on machine and we wanna see how many sticks it runs before crashing :)
Is it also possible to log all counts and show the highest

We have a StickID column and a column that logs the type of mistake and date

Regards
Ratax

4 Replies

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

    hi,@Ratax

         After my research, you do these as below:

    for example:

    basic data

     

    add a measure

    Measure = CALCULATE(COUNT(Table1[ID]),ALLEXCEPT(Table1,Table1[ID]),Table1[Record]<>"crashing")

    Result:

    here is pbix, please try it.

    https://www.dropbox.com/s/vt3g8x3ci3oeknn/Counter%20that%20resets.pbix?dl=0

     

    If it is not your case, please share some data sample and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

     

    Best Regards,

    Lin

    • Ratax's avatar
      Ratax
      Icon for Helper I rankHelper I

      Not quite what i wanted, should have expressed my self more clearly, i am sorry about that

       

      The column M is what i want. A count that resets everytime something is logged in column L

       

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

    hi,@Ratax

         After my research, you do these as below:

    Step1:

    Add a conditional column like this

    Step2:

    select this new column then fill down it

     

    Close&Apply

    Step3:

    Add the result column by this formula

    reset Counter = IF(Table1[count]=Table1[Custom],Table1[count],Table1[count]-Table1[Custom])

    Result:

     

    here is demo, please try it.

    https://www.dropbox.com/s/dwy238t445vzyyq/new%20Counter%20that%20resets.pbix?dl=0

     

    Best Regards,

    Lin

    • Ratax's avatar
      Ratax
      Icon for Helper I rankHelper I

      hey Lin.

       

      Thanks alot, works perfectly

       

      Cheers mate :)