cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GoncaloJ
New Member

Dashboard in PBI Service deformats measures related to DAX TODAY() while refreshing in shared area

I have a Dashboard published in the company's Power BI Server Workspace, and whenever I refresh it in Power BI Desktop everything works well. However whenever it is refreshed in Power BI Service, 2 measures that are related to DATE context, get deformated. Also, when I publish in my personal area in PBI Service it refreshes well without no problem, only deformats in company's shared area.

 

Proof:
My personal area:

GoncaloJ_1-1669824500608.png

Company shared area with deformatted values (measure UC 2022 and UC 2021, that impact the rest):

GoncaloJ_2-1669824573834.png

 

 

From reading in multiple other threads it can be related to date format, date timezone of Power BI Desktop and Power BI Service, however even after trying to fix with the possible solutions it isn't working (still deformats measure).

I'm living in UTC timezone (Working in Lisbon) so when refreshing in Power Service the DAX Measure TODAY() still retrieves the exact same value from the value in Power BI Desktop.

 

I've also tried grabbing the date from Power query using the DAX DateTime.Now() since supposedly (i think) there's no need to change the TimeZone. However even with that measure, it still deformats.

 

I have the measure 1.0_Período Corrente which is given by:

 

 

 

 

 

 

 

 

 

 

 

 

1.0_Período Corrente = LOOKUPVALUE( Date_Table[Period], Date_Table[Current_Day], "Current Day" )

 

 

 

 

 

 

 

 

 

 

 

 

 

where Date_Table has this format:

GoncaloJ_0-1669820857730.png

 

Current_Day column was created with:

 

 

 

 

 

 

 

 

 

 

 

 

Current_Day = 
IF( 
    YEAR(Date_Table[Date Day]) = YEAR(TODAY()) && MONTH(Date_Table[Date Day]) = MONTH(TODAY()) && DAY(Date_Table[Date Day]) = DAY(TODAY()),
    "Current Day",
    "Other Day"
)

 

 

 

 

 

 

 

 

 

 

 

 

 

This is the measure that deformats:

 

 

 

 

 

 

 

 

 

 

 

 

 

UC 2022 T = IF(
    SELECTEDVALUE(Calendario[Periodo]) = VALUE([1.0_Período Corrente]),
    CALCULATE(SUM(Vendas[CU]),  FILTER( Dias, Dias[Dias]<= [1.3.1_Último Dia])),
    CALCULATE(SUM(Vendas[CU]))
)

 

 

 

 

 

 

 

 

 

 

 

 

 

where [1.3.1_Ultimo Dia]  corresponds  to:

 

 

 

 

 

 

 

 

 

 

 

 

 

1.3.1_Último Dia = 
IF(
    LOOKUPVALUE('Date_Table'[Period],Date_Table[Date Day],TODAY()) <=  VALUE('Medidas GJ'[1.0_Período Corrente]),
    LOOKUPVALUE('Date_Table'[Fecha],Date_Table[Date Day],TODAY()),
    CALCULATE(MAX ('Date_Table'[Fecha]),FILTER('Date_Table','Date_Table'[Period]= VALUE('Medidas GJ'[1.0_Período Corrente])))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I'd highly appreciate your help sinceI can't figure out what else to do !  

1 REPLY 1
v-binbinyu-msft
Community Support
Community Support

Hi @GoncaloJ ,

I suspect that it is caused by the difference in time zones. Power BI service operates in the UTC time zone, and evaluates all locale based time functions in that time zone. Power BI Desktop evaluates them according to the locale of the user.

A workaround is to use a fuction such as NOW()+TIME(8,0,0).

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors