dax to power m query
2 TopicsDAX formula to show the Attendance date greater than equal to System date using -UTCNOW() or NOW()?
Hi All, I have a Student table with 5 columns. I have a typical issue where I need to show the datetime for student AttendanceDate for region Armonk and region London . I want any user from USA should only see the records of today's attendance date but for USA [Armonk]it is showing yesterday's date entries [marked in red in the below screenshot]and but for any user in Europe are able see the attendance of today's date . Could anyone suggest any DAX to handle this? I tried the below DAX but it didnt show any record for USA while it showed correct record for Europe region.I am located in Europe region and I published the report from my local machine? Does that make a difference? DAX calculated column formula :- SYSTEM_TIME_REF = NOW() FLAG = IF(student[attendance_date] >= student[SYSTEM_TIME_REF],0,1) Input data source : AttendanceDate Location StudentID Name Region 20.08.2021 11:05AM Gate1 101 Tom London 20.08.2021 10.03.22 Gate1 102 Hary London 20.08.2021 10.09.21 Gate2 103 Rohan Armonk 20.08.2021 09.03.18 Gate2 105 Mohan Armonk 19.08.2021 10.08.22 Gate2 109 Sam Armonk 19.08.2021 10.03.12 Gate2 110 Sally Armonk Expected Output: Whenever the Attendance_Date >= systemtime date then it should set the flag as 0 else 1.Therefore we can filter and show records of the present date based on system date but in case of USA it is showing one day older than the system date while in Europe region it is showing correct records.How to fix this issue , please suggest a DAX? Can someone please suggest any DAX changes or any DAX forumla to handle this in a better way and to rectify this issue? Kind regards Sameer854Views0likes1CommentConvert Earlier function in DAX to Power Query (Reverse Cumulative)
Hello, Apologies in advance but I cannot seem to find a solution to this question. Basically, I wrote a DAX query that works perfectly, but i realised a Power query will be better because I need Power's pivot functionality for some required post analysis. I just started learning DAX and have no idea how to write power queries. For the query, I created two variables _department & _project and execute the following: CALCULATE(COUNTROWS('Table'),FILTER('Table',__department='Table'[department]),FILTER('Table',__project='Table'[Project type]),FILTER('Table','Table'[date]>=EARLIER('Table'[date])) The query filters the table by department and project, then does a reverse cummulative count on the filtered results, grouped by dates. Any idea would be a good starting point for me. ThanksSolved1.9KViews0likes4Comments