Forum Discussion
How to retain calculated value ?
hi Superusers,
I have created a formula ; Part Count = Calculate(Part_Count,FILTER(Table1,Table1_date = Today()),
The objective is to automatically update the part count in a table after a schedule refresh.
However I am facing 2 issues;
1. The formula is unable to retain the previous date value. It will calculate the Part count for today but will change previous day calculation to NULL.
2. Not sure how to write a formula to only do the calculation.
Can someone provide some advice ?
Thanks
4 Replies
- ImkeFCommunity Champion
Hi Anonymous ,
not sure what your requirement exactly is, but how about using <= Today instead? That would keep all values previous to today as well.
Part Count = Calculate(Part_Count,FILTER(Table1,Table1_date <= Today())- AnonymousNot applicable
hi ImkeF,
thanks for the inputs.
I cannot use <= Today() because the data is changed daily and I want a snapshot of the part count.
Example, I want the part count from 1/1/2023 to 5/1/2023 every day and this value is obtained through a measure.
Any inputs are welcome !
- ImkeFCommunity Champion
Hi Anonymous ,
unfortunately I still don't understand your requirement (given the fact that Power BI is not able to persist data in visuals, as the will be re-generated everytime the page is refreshed).
But as your question is specific to DAX, I would strongly recommend to post it in the appropriate forum over here: Desktop - Microsoft Power BI Community
as this is the Power Query section.- AnonymousNot applicable
thanks for the advice. I have reposted my question in the desktop.