Forum Discussion

rnehrboss's avatar
rnehrboss
Icon for Helper II rankHelper II
3 years ago

Ratio over time

Hi,   I'd like to figure out how to do line graph of ratio over time. For example,  I'd like to see the ratio of 1's to 0's over time.  Like this:    Any thoughts?     thanks!

 

2 Replies

  • rnehrboss , You need a measure

     

    if is positive is a measure

     

    divide(Countrows(summarize(Table, date[formatted], [ID])), Countrows(Filter(summarize(Table, date[formatted], [ID], "_1", [is positive]), [_1] =1)))

     

    else

     

    divide(Countrows(summarize(Table, date[formatted], [ID])), Countrows(Filter(summarize(Table, date[formatted], [ID], "_1", Sum([is positive]) ), [_1] =1)))

     

    • rnehrboss's avatar
      rnehrboss
      Icon for Helper II rankHelper II

      Thanks amitchandak  !

       

      Works as expected.   I have some days with few datapoints which causes a lot of variablity.   I was thinking I should make some kind of  weekly moving average, but not really as I don't want the average of the ratio of a day that has 1 point to weigh as heavily as a day that has 100 points.

      Do you have any advice: