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

Urgently - Problems with function Today (), in Power BI Service

Hello everyone

 

I have problems with function Today (), in Power BI Service


I have made a report on the measure: Requested Quantity of today, without making a filter.

I then send my report to Power BI Service and when I refresh the report, it does not show anything about the measure.

 

Example: Here in Power BI Desktop, this report run perfect la fuction today() for Cant. Solicitada, Cant. Programada, Promedio x Día, Desviación Estándar.

 

The formulas are: 

* Cant. Solicitado Hoy = CALCULATE(SUM(FactVentas[CantidadSolicitada]);DimCanalVenta[ECanalVenta] = 2 ; DimTiempo[Fecha] = TODAY())

* Cant. Programado Hoy = CALCULATE(SUM(FactVentas[CantidadProgramada]); DimCanalVenta[ECanalVenta] = 2; DimTiempo[Fecha] = TODAY())

* Promedio Sol x Día = CALCULATE(DIVIDE([CantSol];[Numero de Dias]); DimCanalVenta[ECanalVenta] = 2 ;DimTiempo[DiaSemana] = WEEKDAY(TODAY();2))

* Desviación Estándar = CALCULATE(STDEV.P(FactCantidadSolicitadaFecha[CantidadSolicitadaFecha]);DimTiempo[DiaSemana] = WEEKDAY(TODAY();2))

 

This run perfect in Power BI Desktop

but when i run in Power BI Sevice

Smiley Sad help me

Power BI Desktop: 1.PNG

 

  And when I show this same report in Power BI Service:

 

2.PNG

 

Have I done something wrong?
Or how it works today () in power bi service
All help will be well received.

 

Help me!

 

Thanks 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: Urgently - Problems with function Today (), in Power BI Service

Hi @OzcarHui07

 

What happens is when you use the TODAY() function in the Power BI Desktop it uses your Local System time to determine this.

 

When you upload your file to the Power BI Service, what I can gather from testing is that all the Power BI Servers time is set to UTC. So if you are in a timezone that is say -10 UTC, then due to this it is not today, but according to the Power BI Servers showing as tomorrow.


What I suggest you do, is to alter your Today with -10 hours in the Query Editor?

 

So something like this.

TodaysDate = DateTime.From(DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),-10))
Did I answer your question? Mark my post as a solution!
"Proud to be a Datanaut!"
OzcarHui07 Frequent Visitor
Frequent Visitor

Re: Urgently - Problems with function Today (), in Power BI Service

Hi @GilbertQ


Its perfect, thanks so very much, now i can show without problems.
I resolved the them of UTC, also the zone time.

although, only i have created a other column more of Date in the dimension time and it was asignated data type as Data / Time /TimeZone in the edit queries.

 

Thanks.

2 REPLIES 2
Highlighted
Super User
Super User

Re: Urgently - Problems with function Today (), in Power BI Service

Hi @OzcarHui07

 

What happens is when you use the TODAY() function in the Power BI Desktop it uses your Local System time to determine this.

 

When you upload your file to the Power BI Service, what I can gather from testing is that all the Power BI Servers time is set to UTC. So if you are in a timezone that is say -10 UTC, then due to this it is not today, but according to the Power BI Servers showing as tomorrow.


What I suggest you do, is to alter your Today with -10 hours in the Query Editor?

 

So something like this.

TodaysDate = DateTime.From(DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),-10))
Did I answer your question? Mark my post as a solution!
"Proud to be a Datanaut!"
OzcarHui07 Frequent Visitor
Frequent Visitor

Re: Urgently - Problems with function Today (), in Power BI Service

Hi @GilbertQ


Its perfect, thanks so very much, now i can show without problems.
I resolved the them of UTC, also the zone time.

although, only i have created a other column more of Date in the dimension time and it was asignated data type as Data / Time /TimeZone in the edit queries.

 

Thanks.