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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
mocha911
Frequent Visitor

Flag multiple actions in same day

Hi All,

 

I have tried to figure out this problem but have no success, hope someone can lend me their expertise in this problem. Thanks!

 

The problem-

If action "Sign Up" and (phone or email) happen in the same day, then show the flag for that member as 1, otherwise 0.

 

Data -

 

ClientDateAction
A1/01/2024Phone
A1/01/2024Email
A1/01/2024Sign up
A2/01/2024Phone
B1/01/2024Sign up
B2/01/2024Phone
C3/01/2024Phone
C3/01/2024Email
C4/01/2024Sign Up

 

Expected result -

Resulthave sign up and (email or phone) in same day
A1
B0
C0

 

A has sign up and phone/email on same day. 
B and C don't have the sign up in the same day as phone/email.

 

Thank you again in advance for all the assistance. 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a measure.

Jihwan_Kim_1-1719207667505.png

 

 

Jihwan_Kim_0-1719207643237.png

 

 

expected result measure: =
VAR _t =
    FILTER ( Data, Data[Action] = "Sign up" )
VAR _signupdatelist =
    SUMMARIZE ( FILTER ( Data, Data[Action] = "Sign up" ), Data[Date] )
VAR _condition =
    COUNTROWS (
        FILTER (
            Data,
            Data[Date]
                IN _signupdatelist
                    && Data[Action] IN { "Phone", "Email" }
        )
    ) > 0
RETURN
    IF ( _condition && HASONEVALUE ( Client[Client] ), 1, 0 )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a measure.

Jihwan_Kim_1-1719207667505.png

 

 

Jihwan_Kim_0-1719207643237.png

 

 

expected result measure: =
VAR _t =
    FILTER ( Data, Data[Action] = "Sign up" )
VAR _signupdatelist =
    SUMMARIZE ( FILTER ( Data, Data[Action] = "Sign up" ), Data[Date] )
VAR _condition =
    COUNTROWS (
        FILTER (
            Data,
            Data[Date]
                IN _signupdatelist
                    && Data[Action] IN { "Phone", "Email" }
        )
    ) > 0
RETURN
    IF ( _condition && HASONEVALUE ( Client[Client] ), 1, 0 )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Thanks @Jihwan_Kim !!!!!

You are a magician and life saver! Thank you so much. This works wonderfully.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.