Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Quarter over Quarter - Data Comparison

Hello! Thank you so much in advance for your time on this post.

 

I have a chart that shows the count of engaged users over time. I wanted to do a PoP (Period over Period) comparison. To facilitate this, I created a measure that would essentially duplicate the user count and push it into the future by 1 quarter (or) 3 monhts.

 

** Removing the actual DB names because of confidentiality 

measure= CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH))

 

Now, when I inspect the data of my Viz, I have this:

 

Year, Qtr         Count of users                   measure                          Earliest Date

2017,q2             1000                                                                           4/1/2017

2017,q3             1500                                  1000                                 7/1/2017

2017,q4             1100                                  1500                               10/1/2017

2018, q1            2000                                  1100                                 1/1/2018

2018, q2            2200                                  2000                                 4/1/2018

2018, q3                                                      2200                                 7/1/2018

 

Since we don't have count of users for 2018 q3 (q3 hasn't started yet) I don't want that last portion to appear in my chart.

Right now, I am doing a "dirty fix". I'm checking if the count of users is greater than 0 as a visual level filter.

Is there a better way of doing this?

 

P.S, I tried attaching images and for some reason, chrome won't work :| 

 

Thanks again :)

 

Best,

Bharath

 

 

 

  • Hi
     
    Add a condition to the measure, if the “Count of users” is a measure,
    measure= IF([Count of users]>0, CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH)),BLANK())
     
    If the “Count of users” is a column,
    measure= IF(MAX ([Count of users])>0, CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH)),BLANK())
     
    Or
    Create a calculated column instead of a measure with the following formula.
    column= CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH))
    But a calculated column can’t change with any slicer.
     
     
    Best Regards
    Maggie

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support
    Hi
     
    Add a condition to the measure, if the “Count of users” is a measure,
    measure= IF([Count of users]>0, CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH)),BLANK())
     
    If the “Count of users” is a column,
    measure= IF(MAX ([Count of users])>0, CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH)),BLANK())
     
    Or
    Create a calculated column instead of a measure with the following formula.
    column= CALCULATE(DISTINCTCOUNT(users), PARALLELPERIOD(Date,-3,MONTH))
    But a calculated column can’t change with any slicer.
     
     
    Best Regards
    Maggie
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot for your help :)