Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
patelsa
Regular Visitor

Required Data according to Date and unique ID by Calculating Sum

I required DateWise Sum from the Actual Data by filtering data and id and using Latest record concept. I required help for creating dax for this. Below table Actal Data is my table and Required Data, i need to display in report,  Latest data according to date and id represent how Actual Data should be filter to achieve result. KIndly help for achieving this

Actual Data    Required Data  Latest data according to date and id   
IDDate IsReq DateSum(IsReq) IDDate IsReq
101-01-15 1 01-01-140 201-01-14 0
101-01-17 1 01-01-151 101-01-15 1
101-01-18 1    201-01-14 0
201-01-14 0 01-01-162 101-01-15 1
201-01-16 1    201-01-16 1
301-01-18 0 01-01-172 101-01-17 1
301-01-19 0    201-01-16 1
301-01-20 1 01-01-182 101-01-18 1
301-01-21 1    201-01-16 1
301-01-22 1    301-01-18 0
401-01-20 0 01-01-192 101-01-18 1
401-01-21 0    201-01-16 1
401-01-22 1    301-01-19 0
401-01-23 1 01-01-203 101-01-18 1
401-01-24 1    201-01-16 1
501-01-21 0    301-01-20 1
501-01-22 1    401-01-20 0
501-01-23 1 01-01-213 101-01-18 1
501-01-24 1    201-01-16 1
        301-01-21 1
        401-01-21 0
        501-01-21 0
     01-01-225 101-01-18 1
        201-01-16 1
        301-01-22 1
        401-01-22 1
        501-01-22 1
     01-01-235 101-01-18 1
        201-01-16 1
        301-01-22 1
        401-01-23 1
        501-01-23 1
     01-01-245 101-01-18 1
        201-01-16 1
        301-01-22 1
        401-01-23 1
        501-01-23 1

 

2 REPLIES 2
patelsa
Regular Visitor

Thank you for the suggesion but It is not working, I am not able to get required result. Another point is that Actual Data is not order by ID wise. 

dharmendars007
Super User
Super User

Hello @patelsa , 

 

1. Please create a measure for latest data like below..

LatestActualDate =
CALCULATE(
MAX(Table[Actual Date]),
FILTER(Table,Table[ID] = EARLIER(Table[ID])))

2.Create a measure to check if the record is latest and then use it as Visual level filter.

IsLatestRecord =IF(Table[Actual Date] = Table[LatestActualDate],1, 0)

 

If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.