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

Dax function to display which relative date filter parameter is used

Hi
I have a table of data regarding each user and their login datetime. In my report, I am showing the no. of logins in a column respective to each user in a table by counting the login datetime. There are four buttons(Today,This week,This month,This year) and four bookmarks which are filtered using the relative date filter from the filter panel. By clicking on the buttons, the respective bookmarked(filtered) tables are displayed.

The no. of login column has a custom tooltip which will display "No of logins for <Today/This week/This month/This year>" according to each bookmark page.
Here I need a dax function which will show the above message.
I tried my best and searched for an answer but couldn't find a dax formula to display the relative date filter parameter(day,week,month,year)

 

Sample table

NameStatusNo of LoginsRoleEmail
Tomactive20usertest@test.com
Bobinactive13admintest1@test.com
Johnactive25usertest2@test.com
Andyactive8usertest3@test.com
Philactive35sub admintest4@test.com

 

Expected answer
If the report is on Today bookmark page: No of logins for Today
If the report is on This week bookmark page: No of logins for This week
If the report is on This Month bookmark page: No of logins for This Month
If the report is on This year bookmark page: No of logins for This year

 

Please ask for any additional information on this.
URGENT HELP NEEDED.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

3 REPLIES 3
Anonymous
Not applicable

Your are welcome...

Anonymous
Not applicable

llo

 

I think this video could help you

https://www.youtube.com/watch?v=fLbTFFEEzRk

The video helped me get to my solution..Thank you for that.

I did some modification in my report where I inserted a column with these four words and added a slicer with that column. In each bookmark the respective words are selected and updated the bookmark. Then I hid the slicer from my report. Now with the "selectedvalue" dax function, the desired output is acheived.

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.