cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Meiko
Frequent Visitor

Published report looks different!

Hi,

 

I have a report which I created in Power BI desktop, but when I publish it, it looks different! seems like it can't get the data...

I have attached screenshots from the desktop version and the published one.

 

any idea why is it

happening?

Thanks,

 

I have one variable that uses some vars, could this be causing issue? the rest of them are straight forward:

"Project =
var PlanDateYr = Year(ResPlan[Date])
var PlanDateMnth = MONTH(ResPlan[Date])
var TodayYr = YEAR(TODAY())
var TodayMnth = MONTH(TODAY())
Return
if(ResPlan[Work Type]="Project",
if(PlanDateYr < TodayYr, if(ResPlan[CostType]="Actual",ResPlan[Hours],0),
if(PlanDateYr=TodayYr, if(PlanDateMnth<TodayMnth, if(ResPlan[CostType]="Actual",ResPlan[Hours],0),if(ResPlan[CostType]="Forecasted",ResPlan[Hours],0)),
if(ResPlan[CostType]="Forecasted",ResPlan[Hours],0))),0)"

 

Power BI Desktop.pngPower BI — Mozilla Firefox.png

2 ACCEPTED SOLUTIONS
Duia
Resolver II
Resolver II

Hi  @Meiko ,

Seeing that Today() is used in your function, it may be because the time and date of Power BI Desktop and Power BI Service are different.

 

Power BI Desktop uses the date and time of your computer's local time zone, while Power BI Service only supports date and time in UTC format.

 

If you punish your report with local timezone datetime values, it will convert your datetime values to UTC format and they may different than your desktop values.

 

You might consider using the dax function to add or subtract the difference between your timezone and UTC time.

For example:

Time = Now()-(8/24)

For more details, you can check the following link:

Solving DAX Time Zone Issue in Power BI

Daylight Saving Time And Time Zones In M

Page not found – Bond Consulting Services

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Meiko
Frequent Visitor

Thanks for your reply Liu,

I ended up adding a refresh button which seemes to resolve the issue. what you suggested makes sense.

I think the Today() function messed up my report.

Thanks again

Refresh.png

 

View solution in original post

6 REPLIES 6
Duia
Resolver II
Resolver II

Hi  @Meiko ,

Seeing that Today() is used in your function, it may be because the time and date of Power BI Desktop and Power BI Service are different.

 

Power BI Desktop uses the date and time of your computer's local time zone, while Power BI Service only supports date and time in UTC format.

 

If you punish your report with local timezone datetime values, it will convert your datetime values to UTC format and they may different than your desktop values.

 

You might consider using the dax function to add or subtract the difference between your timezone and UTC time.

For example:

Time = Now()-(8/24)

For more details, you can check the following link:

Solving DAX Time Zone Issue in Power BI

Daylight Saving Time And Time Zones In M

Page not found – Bond Consulting Services

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Meiko
Frequent Visitor

Thanks for your reply Liu,

I ended up adding a refresh button which seemes to resolve the issue. what you suggested makes sense.

I think the Today() function messed up my report.

Thanks again

Refresh.png

 

gauthamboppana
Solution Supplier
Solution Supplier

@Meiko  - can you share the .pbix file with sample data? I can have a look at it.

I found out why the published report shows different result but I still dont know why it's doing it and how to fix it.

The published report only shows data for January 1st of each year but the slicer on the desktop shows the data for each month (based on the selection)

I also found that this column is the issue, if I remove it the published report matches the desktop, when I add it again, it doesn't any more:

"Project =

var PlanDateYr = Year(ResPlan[Date])
var PlanDateMnth = MONTH(ResPlan[Date])
var TodayYr = YEAR(TODAY())
var TodayMnth = MONTH(TODAY())
Return
if(ResPlan[Work Type]="Project",
if(PlanDateYr < TodayYr, if(ResPlan[CostType]="Actual",ResPlan[Hours],0),
if(PlanDateYr=TodayYr, if(PlanDateMnth<TodayMnth, if(ResPlan[CostType]="Actual",ResPlan[Hours],0),if(ResPlan[CostType]="Forecasted",ResPlan[Hours],0)),
if(ResPlan[CostType]="Forecasted",ResPlan[Hours],0))),0)"
 
All I am trying to do here is to compare dates between ResPlan Column and Today's date.
if ResPlan Year is less than Current Year then I get Actual Hours.
If the ResPlan year is equal to current Year then I compare months and if ResPlan month is less than current month again I get Actual Hours other wise I get Forcasted Hours.
Finally if the ResPlan Year is greater than Current Year then I get FOrcasted Hours.
gauthamboppana
Solution Supplier
Solution Supplier

@Meiko  - Are you using a date hierarchy field in your x-axis? If yes, can you check it to normal field and use it (instead of date hierarchy).  Let me know if this works.

gauthamboppana_0-1659635050393.png

 

gauthamboppana_1-1659635072117.png

 



Did I answer your question? Mark my post as a solution! If not, please feel free to ask me.

Also, I would ❤ Kudos if my solution helped.  It is a token of appreciation!

Thank you very much !

Thanks for your reply. I am only using one date and that is not hierarchy:

Meiko_0-1659637644534.png

 

Helpful resources

Announcements
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors