Forum Discussion
Need help to filter data from table based on latest entry
- 9 years ago
Hi prashantvns,
Please use the following formula and get expected result.New1 = FILTER('Existing','Existing'[TestRunID]=CALCULATE(MAX('Existing'[TestRunID]),ALLEXCEPT('Existing','Existing'[PartitionKey],'Existing'[TestRunTime])))
Best Regards,
Angelia
Hi prashantvns,
I create similar sample table as follows and get expected result.
Then click "New Table" under Modeling on Home page, type the formula.
New = SUMMARIZE('Existing','Existing'[PartitionKey],'Existing'[TestRunTime],"TestRunID",MAX('Existing'[TestRunID]),"Count",FIRSTNONBLANK('Existing'[Count],1))
Please see the expected result shown in the following screenshot.
Best Regards,
Angelia
Thanks for your help but the solution you have given is not working fully :( and I still need your help
If you see that the count for TestRunID(2) is 1308 but in your solution it come as 1302
to conclude the final row should be A-----7/17/2017------2-----1308.
Thanks again and wating for your resposne
- v-huizhn-msft9 years agoMicrosoft Employee
Hi prashantvns,
Please use the following formula and get expected result.New1 = FILTER('Existing','Existing'[TestRunID]=CALCULATE(MAX('Existing'[TestRunID]),ALLEXCEPT('Existing','Existing'[PartitionKey],'Existing'[TestRunTime])))
Best Regards,
Angelia- prashantvns9 years agoFrequent Visitor
Hi,
Your solution worked but one more thing :) Is it possible to execute this in Query view instead of Data model view. I need to do this calculation in query view...
Thanks
Prashant