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.
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
Solved! Go to Solution.
Hi @Anonymous ,
You can't store measure value in a table. You may use calculated column instead.
Best Regards,
Jay
@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.
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.
Date | TotalInvoiceValue |
7/20/2020 | 100 |
7/21/2020 | 200 |
7/22/2020 | 150 |
7/23/2020 | 275 |
7/24/2020 | 125 |
7/25/2020 | 185 |
7/28/2020 | 195 |
7/29/2020 | 200 |
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |