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.
Cache and Query Dependencies: The behavior of Power BI Service concerning caching of reports and visuals may differ from that of Power BI Desktop primarily due to the usage of dynamic data coupled with heavily calculated tables and complex DAX measures. To begin troubleshooting, you could try clearing the cache of your web browser where you opened Power BI Service, or in the instance where RLS is applied, check the RLS settings on both applications to see if they match. Also, testing on an incognito window or republishing the report sometimes helps fix excessive caching in the measure calculation process.
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.