07-09-2022 22:00 PM
In the given data filter and show only the most recent row based on date/version etc.
Data: I have taken data where we have ID and date along with status. And we would like to show the latest status.
We will use a DAX measure for that.
I have loaded the data to the power bi file and created the following DAX measure
Last Status = var _max = maxx(filter(ALLSELECTED(Data), Data[ID] = Max(Data[ID])), Data[Date]) return CALCULATE(max(Data[Status]), filter((Data) , Data[Date] =_max))
Refer to the attached file.
I want to display using the card visual the recent value from my table (an excerpt from the original table), the recent % diff, which in this case is 0.29. And will remain so and will not be affected by the slicer until there is another value inputted under "Submitted" that will give another value for %diff. I can't seem to make this happen with lastdate and max function. Is this possible?
Thanks and best regards.
|Date||Submitted||% from total||% running total||Current % total||Previous % total||% diff|
Hi amitchandak this is fantastic. I am using this to flag the latest version of an ID (in my case application reference) and it works great in a table visual. However, there is one issue which I was hoping you could help with - I have a 'stage' column which I use to slice the table visual. When I slice using the stage column it doesn't show the latest IDs in that stage, but instead shows all records for the selected stage. e.g. out of all the latest applications 10 are in stage x, but when I put stage x in a slicer it shows 16 (it basically shows all instances of x historically). I know the issue is around filters, but I can't seem to get it to work.