Forum Discussion

Kostas's avatar
Kostas
Icon for Helper IV rankHelper IV
6 years ago

Calculation into the Published report

Hello All, 

I want to ask if I can stop the calculations of the PowerBi into the published report (via link to my organisation)

I have in the organisation a specific report that I am publishing once a week. 

Each time that I am publishing I am changing the raw data into the report. In the report I have specific visuals and cards that I am calculating the results based on the today's date. 

I want when I am publishing into the web through PowerBI and sending the link, the results that are calculating the dates (e.g. difference of days between the date in the raw data and the today's date) to remain the same. Instead now, each day that I am opening the specific link with the report the report shows the results based on the today's date and not the date that I published the report. 

As a result, I cannot have reports with the historic data as they were when published. 

 

Thanks

 

2 Replies

  • Instead of Today. Use max(Table[date]) in your formula. 

    Example

    Formula = 
    Var   _start_date=(minx('Date',STARTOFYEAR('Date'[Date]))) 
    Var   _end_date=(max('Date'[Date]))
    
    Var _last_year_mtd_val= CALCULATE(sum(Sales[Sales Amount]),Sales[Sales Date] >= _start_date && (Sales[Sales Date]) <= _end_date,filter(Sales,COUNTROWS(SAMEPERIODLASTYEAR(Sales[Sales Date]))>0))
    return
    _last_year_mtd_val
    • Kostas's avatar
      Kostas
      Icon for Helper IV rankHelper IV

      Hello, 

      Most of the formulas that I have are caculated within the table with DAX syntax. 

      How can I transfer the code below in there?

       

      Thanks