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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
rsrajkumar
Helper I
Helper I

DAX expression to get records that have not been updated

Hi,

For the below table, I would like to know the 'Case Number' that have not been updated for the past 10 days by looking at the 'Modified Date' column .

 

 

Case NumberCreated DateModified Date
1560670411-Dec-2411-Dec-24
1561176610-Dec-2412-Dec-24
1561176610-Dec-2411-Dec-24
1561699210-Dec-2423-Dec-24
1561729912-Dec-2417-Dec-24
1561889412-Dec-2419-Dec-24
1561889412-Dec-2412-Dec-24

 

The result for the above table should be as below for today ie 23-Dec-2024

 

Case Numbers not updated for the past 10 days
15606704
15611766

 

Request help on this

 

Thanks

4 ACCEPTED SOLUTIONS
SachinNandanwar
Super User
Super User

 

 

Not updated for past 10 days = CALCULATE(MAX(Case_Records[Case Number]),FILTER(
        Case_Records,
        NOT(
            Case_Records[Modified Date] >= TODAY() - 10 &&
            Case_Records[Modified Date] <= TODAY()
        )))

 

SachinNandanwar_1-1734997337070.png

 



Regards,
Sachin
Check out my Blog

View solution in original post

Sorry I didnt realise that some case numbers will have update dates that fall both within and outside the 10-day interval.

Here is the calculated table approach

 

Final_Table=

       Var _tbl=SUMMARIZECOLUMNS(Case_Records[Case Number] ,  FILTER(
        Case_Records,
        (
            Case_Records[Modified Date] >= TODAY() - 10 &&
            Case_Records[Modified Date] <= TODAY()
        )))
        RETURN  
   
  FILTER(
       DISTINCT( SELECTCOLUMNS(Case_Records,Case_Records[Case Number])),
        NOT(Case_Records[Case Number] IN (SELECTCOLUMNS(_tbl, Case_Records[Case Number]))
    ))       

 

SachinNandanwar_0-1735004045946.png

 



Regards,
Sachin
Check out my Blog

View solution in original post

Kedar_Pande
Super User
Super User

@rsrajkumar 

Create a measure

CasesNotUpdated =
VAR LastModified =
CALCULATE(
MAX(Table[Modified Date]),
ALLEXCEPT(Table, Table[Case Number])
)
RETURN
IF(
DATEDIFF(LastModified, TODAY(), DAY) > 10,
1,
0
)

Use this measure in a visual (e.g., a table or slicer) to filter Case Numbers where the measure equals 1.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

Anonymous
Not applicable

Hi @rsrajkumar ,

 

First of all thanks to Kedar_Pande for the quick reply and solution. I noticed that you also want to count the total number of records where the case has not been updated for more than 10 days, then you can create another measure.

 

(1) My test data is the same as yours.

(2) We can create a measure.

Count =
COUNTROWS (
    FILTER (
        SUMMARIZE ( 'Table', [Case Number], "flag", [CasesNotUpdated] ),
        [flag] = 1
    )
)

(3) Then the result is as follows.

vtangjiemsft_0-1735180537079.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi @rsrajkumar ,

 

First of all thanks to Kedar_Pande for the quick reply and solution. I noticed that you also want to count the total number of records where the case has not been updated for more than 10 days, then you can create another measure.

 

(1) My test data is the same as yours.

(2) We can create a measure.

Count =
COUNTROWS (
    FILTER (
        SUMMARIZE ( 'Table', [Case Number], "flag", [CasesNotUpdated] ),
        [flag] = 1
    )
)

(3) Then the result is as follows.

vtangjiemsft_0-1735180537079.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thanks @Anonymous,@Kedar_Pande , and @SachinNandanwar . All the proposed solution by you works well! 

Kedar_Pande
Super User
Super User

@rsrajkumar 

Create a measure

CasesNotUpdated =
VAR LastModified =
CALCULATE(
MAX(Table[Modified Date]),
ALLEXCEPT(Table, Table[Case Number])
)
RETURN
IF(
DATEDIFF(LastModified, TODAY(), DAY) > 10,
1,
0
)

Use this measure in a visual (e.g., a table or slicer) to filter Case Numbers where the measure equals 1.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

@Kedar_Pande Thanks a lot. It works as intended. I would like to count the total records for which the case has not been updated for more than 10 days. While applying a filter for 'CasesNotUpdated' works on the table, it does not allow applying to a Card. 

SachinNandanwar
Super User
Super User

 

 

Not updated for past 10 days = CALCULATE(MAX(Case_Records[Case Number]),FILTER(
        Case_Records,
        NOT(
            Case_Records[Modified Date] >= TODAY() - 10 &&
            Case_Records[Modified Date] <= TODAY()
        )))

 

SachinNandanwar_1-1734997337070.png

 



Regards,
Sachin
Check out my Blog

Thanks @SachinNandanwar . This was not working for me. It should not return 15618894 as that record was updated on 19-Dec-2024. It should return 15606704 as it was last modified on 11-Dec-2024

Sorry I didnt realise that some case numbers will have update dates that fall both within and outside the 10-day interval.

Here is the calculated table approach

 

Final_Table=

       Var _tbl=SUMMARIZECOLUMNS(Case_Records[Case Number] ,  FILTER(
        Case_Records,
        (
            Case_Records[Modified Date] >= TODAY() - 10 &&
            Case_Records[Modified Date] <= TODAY()
        )))
        RETURN  
   
  FILTER(
       DISTINCT( SELECTCOLUMNS(Case_Records,Case_Records[Case Number])),
        NOT(Case_Records[Case Number] IN (SELECTCOLUMNS(_tbl, Case_Records[Case Number]))
    ))       

 

SachinNandanwar_0-1735004045946.png

 



Regards,
Sachin
Check out my Blog

Thanks @SachinNandanwar . When there are multiple rows for the same Case Number and some of the Last Updated Dates are more than 10 days, and a few less than 10 days, which part of the DAX expression takes care of this? Am asking this because, my actual table has more records and some of them are not working

 

Its the filter with the NOT IN clause takes care of it

FILTER(
       DISTINCT( SELECTCOLUMNS(Case_Records,Case_Records[Case Number])),
        NOT(Case_Records[Case Number] IN (SELECTCOLUMNS(_tbl, Case_Records[Case Number]))
    ))     


Regards,
Sachin
Check out my Blog

Thanks a lot @SachinNandanwar . I learnt something new from you on creating tables , and a few new functions!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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