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
kpatel49
Frequent Visitor

Chart with Dynamic X axis that filters based on date range.

Hello,

I have a table with the following columns:

Dates | User ID | # of Purchases
1/2          1                  3
1/2          2                  2
1/3          1                  4
1/3          2                  1 
1/5          1                  2 

Im trying to find a way to calculate the number of unique users that made a certain amount of purchases between any given dates.  Ideally i would have a slicer for a date range and purchase count to find the number of users.  Any help would be great to calculate this.  Desired Result would looke like a chart similar to below.  So for Example, i would like to know between 8/1 - 8/4 the number of unique users that made a total of 1 transcation, 2 transcation, 3 transaction for that given date range.


kpatel49_0-1660080142781.png

 

Thank you

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @kpatel49 ,

 

Suppose we have a table like this.

vcgaomsft_0-1660640359164.png

First create a calendar table.

vcgaomsft_1-1660640558695.png

'Number of transactions' table:

vcgaomsft_5-1660641841234.png

Relationships:

vcgaomsft_7-1660642216601.png

New a measure:

 

transcation = 
DISTINCTCOUNT('Table'[User ID])

 

New column chart.

vcgaomsft_6-1660642104965.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @kpatel49 ,

 

Suppose we have a table like this.

vcgaomsft_0-1660640359164.png

First create a calendar table.

vcgaomsft_1-1660640558695.png

'Number of transactions' table:

vcgaomsft_5-1660641841234.png

Relationships:

vcgaomsft_7-1660642216601.png

New a measure:

 

transcation = 
DISTINCTCOUNT('Table'[User ID])

 

New column chart.

vcgaomsft_6-1660642104965.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

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.