Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi
I have got the data where i needed to take the Min(First Access card scan) and Max(Last Access card scan) for each date for each employee and i needed to count that 4 different sites and in total, so i put the distinct count on Min and Max. However, when i put the filter on it and choose an employee who e.g. would have come on 21st Dec and scanned the card on entry at 8.30 AM and would have left and scanned out at 5.30 PM and on the next day on 22nd Dec would have scanned in the access card again at 8.30 AM and would have scanned out the card at 5.31, it gives me MIN only once because the time is same 8.30 for both dates and gives me Max correctly since the timings are different for exit. The formulas i used are as following:
For calculating MIN ---
Solved! Go to Solution.
Hi, @samoberoi,
if a card is scanned on multiple sites on a date, it should count as 1? Assuming this is the case, you can write your measures like this:
MeasureNumberOf_IN =
VAR _tmp =
SUMMARIZE (
CALCULATETABLE ( 'Table', 'Table'[In/Out] = "In" ),
'Table'[Card_id],
'Table'[Date]
)
RETURN
COUNTROWS ( _tmp )
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Hi, @samoberoi,
if a card is scanned on multiple sites on a date, it should count as 1? Assuming this is the case, you can write your measures like this:
MeasureNumberOf_IN =
VAR _tmp =
SUMMARIZE (
CALCULATETABLE ( 'Table', 'Table'[In/Out] = "In" ),
'Table'[Card_id],
'Table'[Date]
)
RETURN
COUNTROWS ( _tmp )
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
HI Sturlaws,
Boom! It worked great. I may not have words to express the level of thankfulness to you for your help; however, i am thankful to you a million times. I was stuck on this for days.
Thanks again & regards
Sam
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |