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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to avoid historical data in table view (Should see the record based on latest date).

Hi All,

 

Hope you are doing well, I have a requirement (I have tried in many  ways but nothing worked). Please help with this requirement.

BusiVivek03_0-1683529042708.png

Req 1:

  • Show the records only of the latest date based of the Id or Id and Status. The view should be as shown below.
    BusiVivek03_1-1683529485815.png

Req 2:

  • In KPI "Sum of QTY" must to be 5 instead of 15 (the Qty is duplicated based on the Id).

I apperciate you for your time in helping me.

 

Thank you,

Regards
Vivek B

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,Try measures like, add to visual with all other field as not summarized

 

Last Qty = Var _max = maxx(filter( ALLSELECTED(Data1), Data1[ID] = max(Data1[ID]) ),Data1[Date])
return 
CALCULATE(sum(Data1[qty]), filter( (Data1), Data1[ID] = max(Data1[ID])  && Data1[Date] =_max))



Sum Last Qty = sumx(VALUES(Data1[ID]) , [Last Qty])

 

Follow the approach in my blog  https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,Try measures like, add to visual with all other field as not summarized

 

Last Qty = Var _max = maxx(filter( ALLSELECTED(Data1), Data1[ID] = max(Data1[ID]) ),Data1[Date])
return 
CALCULATE(sum(Data1[qty]), filter( (Data1), Data1[ID] = max(Data1[ID])  && Data1[Date] =_max))



Sum Last Qty = sumx(VALUES(Data1[ID]) , [Last Qty])

 

Follow the approach in my blog  https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit,

I have one doubt. from the below table I need to get Total Qty=55 instead of 152. Can please help me here. Based on distinct Project ID I need the total Qty. 

BusiVivek03_0-1683545028583.png

Thank you for your time.

Regards 

Vivek B

 

Anonymous
Not applicable

Hi Amit,

Thanks for quick response, and the DAX you provided is also working fine.

 

Regards

Vivek

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.