Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Meiko
Helper I
Helper I

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

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.

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 Specialist
Solution Specialist

@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 Specialist
Solution Specialist

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors