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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Count how many values have changed between Yesterday and Today

Good day,

 

I do have below scenario (example)

 

I would like track ONLY changes compare to prior day (BusinessDate). 

 

Customer Table

CustomerNameCustomerId
A1
B2
C3

 

Review Table

CustomerIdBusinessDate  ReviewDate
116-Jun-1924-Jan-18
117-Jun-1925-Jan-19
216-Jun-1919-May-18
217-Jun-1919-May-18
316-Jun-1922-Feb-18
317-Jun-1922-Feb-18

 

For CustomerId = 1, the ReviewDate has changed on the BusinessDate 17-Jun-2019 from 24-Jan-2018 to 25-Jan-2019.  And the rest of the customers information have not changed. So, it should show " 1 ' (because there is only one change).

When user selects the date (17-Jun-2019) from the Date slicer, Table / visual should only show " 1 ".

When user selects the date 16-Jun-2019 from the Date slicer, it should show " 0 " since the information has not changed.

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

You can try to use following measure to achieve your requirement:

Measure =
VAR selected =
    MAX ( Calendar[Date] )
VAR reviewCount =
    CALCULATE (
        COUNTROWS ( Table ),
        FILTER ( ALLSELECTED ( Table ), [BusinessDate] <= selected ),
        VALUES ( Table[CustomerId] )
    )
RETURN
    IF ( reviewCouint >= 1, reviewCount-1 )

Notice: calendar is the source of slicer, please break relationships between current table and calendar table to ignore 'auto exist' filter.

Understanding DAX Auto-Exist

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thank you so much Sheng.

 

I have tried your DAX but did not work for my requirement (I may be missing something).

 

Herewith the DAX:

 

Measure =
VAR selected =
MAX ( Calendar[Date] )
VAR reviewCount =
CALCULATE (
COUNTROWS ( 'Review Date' ),
FILTER ( ALLSELECTED ( 'Review Date' ), [BusinessDate] <= selected ),
VALUES ( 'Review Date'[CustomerId] )
)
RETURN
IF ( reviewCount >= 1, reviewCount-1 )

 

My simple model:

 

Model1.PNG

 

Sample Data:

Model.PNG

 

My Report layer:

 

Model2.PNG

 

Here in the Measure I am expecting: 2, because when I choose 06/17/2019 from the Date slicer ( compare BusinessDates between 6/16/2019 and  6/17/2019 (Date slicer)) , there are 2 ReviewDates have changed.

Model3.PNG

 

 

When I choose 06/18/2019 from the Date slicer, in the Measure I am expecting: 2, because  ( compare BusinessDates between 6/17/2019 and  6/18/2019 (Date slicer)) , there are 2 ReviewDates have changed. Here is screenshot:

Model4.PNG

 

I hope i explained it properly and you can understand my requirement.

 

Thank you

 

 

Anonymous
Not applicable

Hi @Anonymous ,

You can try to use following measure formula to find out changed records:

Measure =
VAR currDate =
    MAX ( 'Calendar'[Date] )
RETURN
    COUNTROWS (
        FILTER (
            SUMMARIZE (
                FILTER (
                    ALLSELECTED ( T1 ),
                    [BusinessDate] <= currDate
                        && [BusinessDate] >= currDate - 1
                ),
                [CustomerId],
                "DC Review", COUNTROWS ( VALUES ( T1[ReviewDate] ) )
            ),
            [DC Review] > 1
        )
    )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors