This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi All Good Morning,
I have one scenario like a time column having time for every day based on user ID, time column will give the in and out the tracking of the user. Consider every day first-time stamp is In next timestamp is out same vice versa.
Could you please see the below data so you can get a better understanding? adding input and expecting out results.
Please help out on it.
Regards,
Balaraju.
Solved! Go to Solution.
Hi @Balaraju,
Please create an index column in Power Query.
Then try following DAX:
Type =
var cur_index='table'[Index]
var confirm=MOD(cur_index,2)
return
IF(confirm=0,"Out","In")
You can get result you want.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Balaraju,
Please create an index column in Power Query.
Then try following DAX:
Type =
var cur_index='table'[Index]
var confirm=MOD(cur_index,2)
return
IF(confirm=0,"Out","In")
You can get result you want.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
My idea, I will base on number of time recorded to define "In" mean Odd number, "Out" mean Even Number
column
Output = if (MOD(COUNTROW(CALCULATETABLE(table, Date = EARLIER (Date), Time <= EARLIER (Time),2) =0,"Out","In")
Sorry It is not working
Can you share notice after create Column?, make sure your Date column Time column in right type (Date/Time) to make comparision.
yes, use right opening and closing to make right EARLIER function
EARLIER(Attendance[Date])
EARLIER(Attendance[Time])
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 26 | |
| 23 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 28 | |
| 24 | |
| 22 |