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
NISH72
Helper IV
Helper IV

Flag members based on date

Hi everyone I have a members and date column in a report which is connected to SQL database and I want to flag members who have appeared in report more than 6 months ago. The report has been refreshing daily since last 1 year. What would be the dax to flag the members. For eg today is November 26 so I want to flag members who were there in report before May 26. Thank you
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @NISH72 ,

I'm not so clear for your data structure, can you please share some sample data for test? 

How to Get Your Question Answered Quickly  

In addition, you can also try to use below formula if it suitable for your requirement:

Flag =
IF (
    COUNTROWS (
        FILTER (
            'Table',
            [UserID] = EARLIER ( 'Test'[UserID] )
                && [ReportDate]
                    < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 6, DAY ( TODAY () ) )
        )
    ) >= 1,
    "Y",
    "N"
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @NISH72 ,

I'm not so clear for your data structure, can you please share some sample data for test? 

How to Get Your Question Answered Quickly  

In addition, you can also try to use below formula if it suitable for your requirement:

Flag =
IF (
    COUNTROWS (
        FILTER (
            'Table',
            [UserID] = EARLIER ( 'Test'[UserID] )
                && [ReportDate]
                    < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 6, DAY ( TODAY () ) )
        )
    ) >= 1,
    "Y",
    "N"
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
NISH72
Helper IV
Helper IV

Can someone please help.
Anonymous
Not applicable

Add this measure in the table:
 
new measure = CALCULATE(COUNT('table'[Name]), FILTER('table','table'[Date] < [(Today() - 180)] ))
 
 
It counts how many times one name is appeared in the list , which date is before 180 days ago.

Do you want to flag members that are in the report today and more than 6 months ago? The way you are framing your question now is that you just want to display members which appeared more than 6 months ago (which is a simple visual filter or page filter)?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.