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

Get total up to and including currently selected date in slicer

I have a table with user registration dates. Each row in the table is the date the user registered. Counting all the rows in the table will give you all the users that registered. When I add a date slicer to this report I can get all the users that registered within a specified timeframe. Now what I am trying to get is the number of users that registered up to and including that last date in selected in the slicer.

 

For example:

 

Registered_on

2017-01-20

2017-01-21

2017-02-15

2017-03-16

 

If 2017-02 is selected the number of users registered in that month is 1 but the total number of users registered up to that point is 3. How do I get something to return 3?

 

I know I can get a total all time registered using ALL to get 4.

 

Thank you,

 

1 ACCEPTED SOLUTION
jreade
Frequent Visitor

I think I figured it out... I created the following measure:

 

Total Registered Users = CALCULATE(COUNTROWS(users_table),FILTER(ALL(users_table),users_table[user_registered]<=MAXX(users_table,users_table[user_registered])))

View solution in original post

2 REPLIES 2
jreade
Frequent Visitor

I think I figured it out... I created the following measure:

 

Total Registered Users = CALCULATE(COUNTROWS(users_table),FILTER(ALL(users_table),users_table[user_registered]<=MAXX(users_table,users_table[user_registered])))

jreade
Frequent Visitor

https://community.powerbi.com/t5/Desktop/Using-the-displayed-date-slicer-for-measure/td-p/119835

 

This posted helped me a lot. Took me a long time to find a post like this.

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.