Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
@VitorXavierCell , Refer my these two blogs
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Hi @VitorXavierCell ,
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 @VitorXavierCell ,
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...
@VitorXavierCell , 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?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |