Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
😞 help me
Power BI Desktop:
And when I show this same report in Power BI Service:
Have I done something wrong?
Or how it works today () in power bi service
All help will be well received.
Help me!
Thanks
Solved! Go to Solution.
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))
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.
It seems as if using UTCTODAY is making things work
OK, this is a bit of a bump from the past, but the problem in question ALMOST describes my problem perfectly. I too have a measure which is showing no results in the service, but is working perfectly in desktop, measure is this:
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))
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.