Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
adadeacon
New Member

How to EXCLUDE data from the past 12 months?

I have a report where I need to show the contact details of the active and inactive users on a web site.

I've managed to use the 'last login date' field and the "Relative date" filter to show the users who had logged in during the past 12 months. These are considered active users.

Filter type: Relative date

- is in the past

- 12

- months, include today

 

I cannot seem to figure out how to show the users who had 'not' logged in during the past 12 months. Ie. I want to show the list of users and exclude the ones with a 'last login date' that falls within the last 12 months.

 

Any advice?

2 ACCEPTED SOLUTIONS

Thanks Tom, I'm a beginner when it comes to Power BI. Any tips on how I could create the IsActiveMeasure?

View solution in original post

Hi @adadeacon ,

 

Maybe something like this? 🙂

 

tackytechtom_0-1684811326880.png

 

Here the DAX: 

IsActiveMeasure = 
IF ( SELECTEDVALUE ( Table[Date] ) >= DATE ( YEAR (TODAY() ) -1, MONTH ( TODAY() ), DAY( TODAY() ) ), 1, 0 ) 

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

3 REPLIES 3
tackytechtom
Super User
Super User

hi @adadeacon ,

 

In this case I'd probably create a measure like IsActiveUser that returns a 1 or true if it is one and a 0 or false if it is not. Then you can use that flag in the filter pane.

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Thanks Tom, I'm a beginner when it comes to Power BI. Any tips on how I could create the IsActiveMeasure?

Hi @adadeacon ,

 

Maybe something like this? 🙂

 

tackytechtom_0-1684811326880.png

 

Here the DAX: 

IsActiveMeasure = 
IF ( SELECTEDVALUE ( Table[Date] ) >= DATE ( YEAR (TODAY() ) -1, MONTH ( TODAY() ), DAY( TODAY() ) ), 1, 0 ) 

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.