Forum Discussion
mocha911
2 years agoFrequent 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) h...
- 2 years ago
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.
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 )
Jihwan_Kim
Super User
2 years agoHi,
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.
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 )
mocha911
2 years agoFrequent Visitor
Thanks Jihwan_Kim !!!!!
You are a magician and life saver! Thank you so much. This works wonderfully.