Forum Discussion

bilalkhokar73's avatar
bilalkhokar73
Icon for Helper IV rankHelper IV
5 years ago
Solved

After Publish DAX Error

SALES ORDER = CALCULATE(SUM(Sales[Amnt]),filter(Sales,Sales[ORDER_TYPE]="SALES_ORDER"), FILTER(ALL(date),date[date]>=date(YEAR(TODAY()),MONTH(TODAY()),1) && date[date]<TODAY() ))   Dear team, Whe...
  • v-deddai1-msft's avatar
    5 years ago

    Hi bilalkhokar73 ,

     

    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, it used date from the server that hold your files .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.

     

    You can alter your Today with -10 hours in the Query Editor:

     

    TodaysDate = DateTime.From(DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),-10)  

      

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

     

    Best Regards,

    Dedmon Dai