I am creating PowerBI dashboard using SQL Database of attendance system. In dashboard I want to show employees count on each floor. (For Example - If employee punch-in on 6th floor attendance machine then employee count of 6th floor will increase by 1 number.
For this I have created new table in SQL database & written below query.
From [PowerBI].[dbo].[PowerBI_data] order by edatetime desc
Currently whenever I execute this query output result is showing multiple IN & Out entries as employees Punch-In & Punch-out many times in a day.
Instead of showing all the IN & Out entries, I wanted to see ONLY RECENT Punch-In/Punch-Out entry results of each employee.
Can you please suggest what query I have write to get this data..?