When DAX measures provide accurate outcomes in Power BI Desktop but vary in Power BI Service, the root cause of the problem mostly lies in the differences in the data model, regional settings, or caching mechanisms of the two instances.
Data Refresh and Model Syncing: One such instance can be that the data in the Power BI Service is not completely up to date or synchronized with the data in the Power BI Desktop version. Once the report is published in the Power BI Service, any edits made on the Power BI Desktop after the first one will not be available in the Service before the refresh of the dataset there. Make sure that you have refreshed the data in the Power BI Service and that all scheduled refreshes are occurring as they should. If your data source is configured to use DirectQuery, then make sure that it has been properly set up in Power BI Service because some gateway or connection problems may cause incorrect outcomes.
Regional and Time Zone Differences: Power BI Service is region-fixed or set to ‘UTC,’ but Power BI Desktop applies the local settings of the computer being used. This can lead to issues with DAX time intelligence functions such as TODAY() and NOW(), as estimated time calc approaches based on local time may be turned on. Review and modify time zone settings in the Power BI Service as appropriate to ensure they are consistent with the Power BI Desktop.
Data refresh, regional settings, and cache behaviors can be checked to explain the difference in the behavior of DAX measures in Power BI Service and to assist in keeping the calculations uniform in both environments.