Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

 

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
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

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
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
Not applicable

Thanks a lot for your help 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.