Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
07-14-2022 10:13 AM
In the given data filter and show only the most recent row based on date/version etc. It should also do the correct sum.
In the last blog, I discussed how can we get the latest status, but it will not give the correct grand total for qty/value.
Data: I have taken data where we have ID and date along with Qty. And we would like to show the latest Qty.
We will use a DAX measure for that.
I have loaded the data to the power bi file and created the following DAX measure
DAX Code- I created 2 measures
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])
Please check more details on the blog
Hello,
I am trying to build a matrix in PowerBI and have created a new measure for my value field: