The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a table with keys, values and dates.
I need to filter the unique keys according to the most recent date and thus use the corresponding value.
Key | Value | Date |
AAAA | 80 | 25/01/2019 |
AAAA | 31 | 19/06/2019 |
BBBB | 42 | 30/07/2020 |
BBBB | 90 | 17/02/2020 |
AAAA | 29 | 28/06/2019 |
CCCC | 38 | 08/01/2020 |
DDDD | 42 | 22/08/2020 |
BBBB | 56 | 23/11/2020 |
EEEE | 70 | 24/09/2019 |
So I need to be able to make a table appearance, with date reference, with the values and the sum.
Key | Value |
AAA | 29 |
BBBB | 56 |
CCCC | 38 |
DDDD | 42 |
EEEE | 70 |
total | 235 |
Can someone help me?
Please try this expression in your measure.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous - Use Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
Thanks for the answer, but in fact I don't want to add them all up, I just want the most recent result for duplicate lines, ignoring the one with the oldest reference.
In addition to adding it all up, the column total does not reflect the total rows 😞
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |