March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I want to write a Dax code, which give us the value for the latest data. I have written code, which is giving the latest value for all the three categories, but I only want to see the value for only the latest date i.e. 30th November data (Success = 9400)
I have tried different versions as well...
Yesterday order = calculate(sum('order summary item data'[total]), 'order summary item data'[date] = max('order summary item data'[date])))
I
Solved! Go to Solution.
Hi @Sarvagya ,
Because you do not provide sample data, I create a table for test by my understand
1. below is my test table
2. create a measure with below dax formula
Measure =
VAR max_date =
MAXX ( ALL ( 'Table' ), [Date] )
VAR cur_date =
SELECTEDVALUE ( 'Table'[Date] )
RETURN
IF ( cur_date = max_date, 1, 0 )
3. add a table visual and column visual with fields
4. add the measure that created befor to above visual filter pane
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sarvagya ,
Because you do not provide sample data, I create a table for test by my understand
1. below is my test table
2. create a measure with below dax formula
Measure =
VAR max_date =
MAXX ( ALL ( 'Table' ), [Date] )
VAR cur_date =
SELECTEDVALUE ( 'Table'[Date] )
RETURN
IF ( cur_date = max_date, 1, 0 )
3. add a table visual and column visual with fields
4. add the measure that created befor to above visual filter pane
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Sarvagya , refer if my blogs can help
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
120 | |
77 | |
59 | |
53 | |
40 |
User | Count |
---|---|
193 | |
106 | |
88 | |
62 | |
51 |