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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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