Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a table with a list of users, each with a start and end date for their subscription.
What I would like to add to reports is a way to filter the visuals just considering the users which had an active subscription depending on the calendar date slicer.
So for example:
User A has a start subscription date the 15/1/2022 and expiration subscription date the 15/5/2022. So if I choose March 2022 in my date slicer they should pop up, but if I choose June 2022 they shouldn't.
How can I achieve it? Through a measure or column? and how can the DAX be?
@johnt75 It doesn't work, it returns 1 also when the license is expired. Any idea on why?
can you post a screenshot ?
Sorry, I meant a screenshot of the table visual showing the incorrect data
This User had a License start date in Sep 2021 and expired in Jan 2022, so before and after should be 0
Is it possible for an email address to appear multiple times in keystone_users? that would prevent SELECTEDVALUE from working
No, every user appears max one time.
No, every user appears max one time.
for debugging try changing the measure to return licenceStartDate and then licenceEndDate, see what that shows.
is there a relationship between calendar and keystone_users? if so, what is the cardinality and direction ?
As it needs to react to slicers it will have to be a measure, not a column. You can create a measure like
User has active licence =
var minDate = MIN('Date'[Date])
var maxDate = MAX('Date'[Date])
var licenceStartDate = SELECTEDVALUE( 'Table'[Licence start date])
var licenceEndDate = SELECTEDVALUE('Table'[Licence end date])
return IF( licenceStartDate <= minDate && ( ISBLANK(licenceEndDate) || licenceEndDate >= maxDate ), 1 )then put that as a filter on your table visual to only show when the value is 1
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |