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
Anonymous
Not applicable

Store Measure values in a table

Hi Everyone,

 

We have a report that is refreshed twice everyday, excluding weekends. A measure calculates the total invoice value for the previous day, but is not stored in any data source. I`d like to store this value every day such that only the previous day value is updated after every refresh & other dates/ values are not changed, thereby be able to calculate & display the month to date values.

 

I used the below. The calendar table has dates from 01-01-2020 till 12-31-2030 & the below populates the values on all dates with the current value. I`m not sure how to work with this one.

 

MTD = SUMMARIZE('Calendar','Calendar'[Date], "MTD", CALCULATE([TotalInvoiceValue],FILTER('Calendar','Calendar'[Date] = TODAY()))

 

Thanks in advance

Regards,

Anil

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You can't store measure value in a table. You may use calculated column instead.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Not very clear

refer

Power BI — Day Intelligence Questions — Time Intelligence 5–5
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

 

Power BI — MTD Questions — Time Intelligence 3–5
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

 

examples

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))
Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Day))
Diff COlumn = datediff(maxx(filter(Table,Table[Date]<earlier(Table[Date]) && Table[Numberf]= earlier(Table[Numberf]) ),Table[Date]) ,Table[Date],Day)

This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184


Appreciate your Kudos.

Anonymous
Not applicable

Thanks @amitchandak . This is helpful. Apologies if it was not clear. I`ll try again.

 

The total invoice value is calculated everyday. Everyday its a new value & I want this to be stored in a table after the data refresh everyday like in the below table. Since these are not stored anywhere else, I was exploring a possibitlity to store in a table in the report. 

 

DateTotalInvoiceValue
7/20/2020100
7/21/2020200
7/22/2020150
7/23/2020275
7/24/2020125
7/25/2020185
7/28/2020195
7/29/2020200

 

Once I`m able to store these, I`d use the MTD caluclations as you explained in the other posts. Hope this is clear now.

 

Regards,

Anil

Hi @Anonymous ,

 

You can't store measure value in a table. You may use calculated column instead.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

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.