Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have the following table. I would like to create a card that shows the last sales value added to the table. In this case, the card should show 135. How can I create achieve this? Thank you so much!
Solved! Go to Solution.
Hello,bhanu_gautam ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@EstherBR .I am glad to help you.
If your real data is as per the test data you have provided and the Date column is registered in chronological order, i.e. the date of the next rank will always be greater than the date above it (i.e. chronological rank)
Then you can refer to my test below.
Last_notblankSales =
VAR _maxDate =
CALCULATE (
MAX ( 'Sheet2'[Date] ),
FILTER ( ALL ( Sheet2 ), NOT ( ISBLANK ( 'Sheet2'[Sales] ) ) )
)
RETURN
CALCULATE (
MAX ( 'Sheet2'[Sales] ),
FILTER ( ALL ( Sheet2 ), 'Sheet2'[Date] = _maxDate )
)
Here is my test data:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,bhanu_gautam ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@EstherBR .I am glad to help you.
If your real data is as per the test data you have provided and the Date column is registered in chronological order, i.e. the date of the next rank will always be greater than the date above it (i.e. chronological rank)
Then you can refer to my test below.
Last_notblankSales =
VAR _maxDate =
CALCULATE (
MAX ( 'Sheet2'[Date] ),
FILTER ( ALL ( Sheet2 ), NOT ( ISBLANK ( 'Sheet2'[Sales] ) ) )
)
RETURN
CALCULATE (
MAX ( 'Sheet2'[Sales] ),
FILTER ( ALL ( Sheet2 ), 'Sheet2'[Date] = _maxDate )
)
Here is my test data:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@EstherBR , You can create a measure
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |