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.
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.
Solved! Go to Solution.
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.
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.
I entered exactly what you sent, replacing 'Table' with my table name. I didn't get any results in the column.
Hi @laura_ESNH ,
did you use a date table?
Did you create it as a measure?
Could you share a sample PBIX file?
Hi @mwegener - I appreciate you sticking with me. To answer your questions...
I used the date field as it imports into PowerBI. After import,
Yes, I created a measure.
Unfortunately, the organization I work for is very restrictive on sharing documents through OneDrive.
I've attached some additional screen captures. Let me know if you want to see something else.
Visual I'm trying to finish:
Data
Measure
Thank you so much for your help!!
Hi @mwegener - That worked! Sorry that I missed that nuance from your initial solution. I marked that post as the solution. Thanks for the help!
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |