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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
selpaqm
Helper V
Helper V

check date if new one

Hi,

 

I have a table as below.

 

IDchecking date System Notifcation Sendproduct send
111101/01/2022YESYES
222202/01/2022NOYES
333301/01/2022NONO
111102/02/2022NOYES
555503/01/2022NOYES
222207/01/2022NOYES
222209/01/2022YESYES
444410/01/2022NOYES
444410/01/2022YESYES

 

I am trying to find which ID is never system notification is send (for notfication send yes, checking date must be newer or on same day than notification send NO.), and product send is yes.

 

result should be 1111 and 5555

 

for seeing details it need to be calculated column instead of measure.

 

thanks for your help.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @selpaqm ,

 

Try the measure formula like below:

M_ =
VAR cur_data =
    MAX ( 'Table'[checking date ] )
VAR countrow =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT ( 'Table', 'Table'[checking date ] )
    )
RETURN
    IF (
        countrow >= 2
            && MAX ( 'Table'[System Notifcation Send] ) = "No",
        "yellow",
        "white"
    )

vhenrykmstf_0-1644571690129.png

If I misunderstood you, could you further describe your needs and provide a screenshot of the desired results so that I can answer them for you as soon as possible.

 

Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @selpaqm ,

 

Try the measure formula like below:

M_ =
VAR cur_data =
    MAX ( 'Table'[checking date ] )
VAR countrow =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT ( 'Table', 'Table'[checking date ] )
    )
RETURN
    IF (
        countrow >= 2
            && MAX ( 'Table'[System Notifcation Send] ) = "No",
        "yellow",
        "white"
    )

vhenrykmstf_0-1644571690129.png

If I misunderstood you, could you further describe your needs and provide a screenshot of the desired results so that I can answer them for you as soon as possible.

 

Best Regards,
Henry


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

Samarth_18
Community Champion
Community Champion

Hi @selpaqm ,

 

You can create a custom column with below and use it as filter on your visual:-

Column = 
VAR max_date =
    CALCULATE (
        MAX ( 'Table'[checking date ] ),
        ALL ( 'Table' ),
        'Table'[ID] = EARLIER ( 'Table'[ID] )
    )
RETURN
    IF (
        COUNTROWS (
            FILTER (
                'Table',
                'Table'[System Notifcation Send] = "NO"
                    && 'Table'[product send] = "YES"
                    && 'Table'[checking date ] = max_date
            )
        ) > 0,
        1,
        0
    )

 

Output:-

image.png

image.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18 one more question. I have detected one issue. according to new situation I have also editted my original post.

on some of my examples checks has been done in same day and notfication for one of them is NO and for the the other one is yes. so that is not an issue for me and need to be highlighted as 0. what can we do for it?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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