Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kostas
Helper IV
Helper IV

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 2
amitchandak
Super User
Super User

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.