Forum Discussion
New column with data from latest entry
I am working on a project for a weight loss program. We track the participants weight and BMI each month.
I have created a table with the maximum weight, minimum weight and quick measures of the difference and % difference between the min and max.
What I really want to analyze, is the maximum weight to the participants weight on the last entry. To do this, I'm assuming I need to create a new column that contains the weight from the latest date.
Is there a way to use DAX to automatically update the weight in this new column each time a new entry is created? I'm new to Power BI and DAX, so I'll need specific functions that I should use.
Hi laura_ESNH ,
try this.
Last Weight = CALCULATE(MAX('Table'[Weight]), FILTER(ALL('Table'[Reporting Date].[Date]), 'Table'[Reporting Date].[Date] = MAX('Table'[Reporting Date])))If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
6 Replies
- mwegener
Most Valuable Professional
Hi laura_ESNH ,
try this.
Last Weight = CALCULATE(MAX('Table'[Weight]), FILTER(ALL('Table'[Reporting Date].[Date]), 'Table'[Reporting Date].[Date] = MAX('Table'[Reporting Date])))If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
- laura_ESNHFrequent Visitor
I entered exactly what you sent, replacing 'Table' with my table name. I didn't get any results in the column.
- mwegener
Most Valuable Professional
Hi laura_ESNH ,
did you use a date table?
Did you create it as a measure?
Could you share a sample PBIX file?