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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AndrewHam
Helper I
Helper I

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 4
ImkeF
Super User
Super User

Hi @AndrewHam ,
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.



Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

thanks for the advice. I have reposted my question in the desktop.

ImkeF
Super User
Super User

Hi @AndrewHam ,
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())


Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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 !

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors