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

Count of purchases within the chosen time filtered count of reviews (Double Filter??)

Hello PBI Masters 😃

Background: we have information like below:

Review NameReview DateProduct Purchase Date
Name A06/05/202004/30/2020
Name B06/25/202005/06/2020
Name C06/30/202006/21/2020
Name D07/05/202006/15/2020
Name E07/13/202004/30/2020
Name F07/15/202007/01/2020
Name G07/16/202004/30/2020
Name H07/25/202006/15/2020

 

Report filter pane has a time slicer for the users to choose a time period.

The whole report is filtered based on Review Date since that's the users interested in. 

 

The goal: (within the 8 reviews in the example in the table above)

When the user chose: Time Period: 06/01/2020 - 07/25/2020

The Review Count: 8 (because 8 reviews were posted during the chosen time)

The purchase count during chosen time period: 4 (because within those reviews, only 4 purchase were made)

 

When the user chose: Time Period: 06/01/2020 - 06/25/2020

The Review Count: 2 (because 2 reviews were posted during the chosen time)

The purchase count during chosen time period: 0 (because within those reviews, none purchase were made during the same period)

 

Please help 💛 lots thanks!

 

 

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

I modified @Ashish_Mathur 's measure like so:

 

Purchase count = 
CALCULATE (
    COUNTROWS ( Data ),
    Data[Product Purchase Date] IN VALUES ( 'Calendar'[Date] )
) + 0
Review count = COUNTROWS(Data)

 

 

And get this:

6.PNG67.PNG7.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

 

I modified @Ashish_Mathur 's measure like so:

 

Purchase count = 
CALCULATE (
    COUNTROWS ( Data ),
    Data[Product Purchase Date] IN VALUES ( 'Calendar'[Date] )
) + 0
Review count = COUNTROWS(Data)

 

 

And get this:

6.PNG67.PNG7.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thank you @Icey  and thank you @Ashish_Mathur  for helping. 

Ashish's file plus Icey's modification on the measure made it perfect!

Have a great day ahead!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.