I have a report which shows some data on card but when i publish this report to service then it shows some incorrect data.
why is it so?
Pretty hard to suggest without knowing what the measure in the card is supposed to be doing, what your data source is that the measure is using, whether upon publishing it's getting newer data, etc etc etc... too vague to answer right now
The data in card is showing total hours,I am pulling this data from an On premise sql server for which i have created a gateway on my local machine.So i refresh all the data in desktop file and when i publish it on service then the data on particular card gets changed automatically.the data in my sql table and desktop file is same but not on the service.
What could be the problem?
It seems that you have installed the on-premise Gateway on your machine, do you configure the gateway and add the data source in Power BI Service?
In addition, could you describe your scenario in more details?
When you refresh the data in Power BI Desktop, have you published the report to Power BI Service before?
Please provide more details, so that we can help further investigate on it?