- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Dax code should only show the latest value in the chart
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Sarvagya , refer if my blogs can help
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-16-2024 03:22 AM | |||
08-06-2024 10:49 PM | |||
10-29-2023 07:35 PM | |||
01-20-2023 05:00 AM | |||
12-11-2023 03:48 PM |
User | Count |
---|---|
137 | |
107 | |
85 | |
59 | |
46 |