Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 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 Team,
I am trying to get most recent date data based up on the below columns,In VGBEL column from last 2nd row is having recent date,so only that column should be seen in the result. we should get last two rows in the result.
Regards,
Harish.
Solved! Go to Solution.
Hi @Harish85 - Create a new calculated table as like below and replace with your table name as per your model.
Proud to be a Super User! | |
Thanks for the replies from danextian and rajendraongole1.
Hi @Harish85 ,
If you want to take the rajendraongole1's method, you need to create a calculated table instead of a measure:
The method provided by danextian requires the creation of a calculated column, which is then filtered on the visual:
If you need a measure, you can also refer to the following method:
1. Create a measure:
Measure = IF(CALCULATE(MAX('Table'[UPDATE_DATE_TIME]),ALLEXCEPT('Table','Table'[VGBEL]))=MAX('Table'[UPDATE_DATE_TIME]),1,0)
2. Use this measure to filter the visual:
3. Results obtained using simple data:
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Harish85 - Create a new calculated table as like below and replace with your table name as per your model.
Proud to be a Super User! | |
Getting above error, and one more thing there will be thousands of data, it will apply to all rows right.
Hi @Harish85
Create this calculated column
Latest Records =
-- This measure determines if a row represents the latest record for each 'vgbel'.
IF(
CALCULATE(
-- Find the maximum value of the 'updated_date_time' column for the current 'vgbel'
MAX('table'[updated_date_time]),
-- Modify the filter context to include only the rows with the same 'vgbel'
ALLEXCEPT('table', 'table'[vgbel])
)
-- Compare the maximum 'updated_date_time' for the current 'vgbel'
-- with the 'updated_date_time' of the current row
= 'table'[updated_date_time],
-- If the comparison is TRUE, return 1
1,
-- Otherwise, return 0
0
)
This check for the updated_date_time date time for each disintct vgbel and compare it against the current row's updated_date_time. If they're the same this will return 1 else 0. Filter your visual to 1.
Proud to be a Super User!
User | Count |
---|---|
119 | |
66 | |
65 | |
56 | |
50 |
User | Count |
---|---|
177 | |
84 | |
70 | |
64 | |
54 |