Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a database that has the following colunms: Product, Date and value. I need to get the value of the last date per product, to put in a card. How can I do this?
Best regards!
Solved! Go to Solution.
@Anonymous , Refer my these two blogs
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Hi @Anonymous ,
You can try the following methods.
Here is my test table:
Measure:
Max date =
CALCULATE (
MAX ( 'Product'[Date] ),
FILTER ( 'Product', [Product] = SELECTEDVALUE ( 'Product'[Product] ) )
)Max date value =
CALCULATE (
MAX ( 'Product'[Value] ),
FILTER (
'Product',
[Date] = [Max date]
&& [Product] = SELECTEDVALUE ( 'Product'[Product] )
)
)
The result is:
Is this the result you expect?
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can try the following methods.
Here is my test table:
Measure:
Max date =
CALCULATE (
MAX ( 'Product'[Date] ),
FILTER ( 'Product', [Product] = SELECTEDVALUE ( 'Product'[Product] ) )
)Max date value =
CALCULATE (
MAX ( 'Product'[Value] ),
FILTER (
'Product',
[Date] = [Max date]
&& [Product] = SELECTEDVALUE ( 'Product'[Product] )
)
)
The result is:
Is this the result you expect?
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Why is this accepted as solution when SELECTEDVALUE would only work when there's exactly one value selected for a given dimension? There could easily me more than one or none Product(s) selected at all...
@Anonymous , Refer my these two blogs
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Why can't we just use LASTNONBLANK/LASTNONBLANKVALUE here?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |