Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Guys I need your help, I have 2 columns that was created in power query with formulas. The first column was to calculate the duration of opened cases by minutes using the following code Duration in Minutes = Duration.TotalMinutes(DateTime.LocalNow() - [Creation Date]) and then the second column to return the value yes or no based on the open time of the cases with the following code if [Case Type]="Water Emergency" and [Duration in Minutes]>=180
then "Yes"
else if [Case Type]="Unknown Water Customer Complaint" and [Duration in Minutes]>=180
then "Yes"
else if [Case Type]="Electricity Emergency" and [Duration in Minutes]>=120
then "Yes"
else if [Case Type]="Unknown Electricity Customer Complaint" and [Duration in Minutes]>=120
then "Yes"
else "No"
and then I created cards and slicers to return the number of cases that exceeded SLA and all is good and getting the correct number in power bi desktop. However, after I publish the report it will show the SLA cases number correct until the first refresh of the data and then I will keep on getting a number that does not match the exact same file on the power bi Desktop and below is a sample of the difference in numbers and I made sure that all the filters were cleared and data was refreshed and the same in both files
In Power Bi Desktop
Published Report
I tried every thing and couldn't find a solution, I even dowloaded the published file and when opening it on desktop it will show the correct number
Solved! Go to Solution.
It is likely because in the Power BI service datetime.localnow returns the date/time in UTC, which you should be able to validate.
It is likely because in the Power BI service datetime.localnow returns the date/time in UTC, which you should be able to validate.
thank you so much!!
Instead of using DateTime.LocalNow(), I had to use DateTimeZone.UtcNow() + TIME(4,0,0)
Thaaaanks Man , you are a legend
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!