Forum Discussion
Anonymous
6 years agoNot applicable
Latest Record Based on Date Slicer
First time question poster here! Excel and PowerBi files here: https://www.dropbox.com/sh/g3pfws2xzkmqgqy/AADUrdKWRzHDSCQ5qF8gVQxDa?dl=0 I have change log of many aspects for employees, and I...
- 6 years ago
Hi Anonymous
Check if it is correct on your side.
Create a new table
attribute = VALUES('Log'[Attribute])Modify measure as below
attribute selected = VAR maxdate = CALCULATE ( MAX ( 'Log'[Record Date] ), FILTER ( ALLSELECTED ( 'Log' ), 'Log'[Employee ID] = MAX ( 'Log'[Employee ID] ) && 'Log'[In View] = 1 ) ) VAR attr = CALCULATE ( MAX ( 'Log'[Attribute] ), FILTER ( ALLSELECTED ( 'Log' ), 'Log'[Employee ID] = MAX ( 'Log'[Employee ID] ) && 'Log'[Record Date] = maxdate ) ) RETURN IF ( HASONEFILTER ( attribute[Attribute] ), IF ( SELECTEDVALUE ( attribute[Attribute] ) = attr, attr ), attr )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
6 years agoSample data as text would be extremely helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- Anonymous6 years agoNot applicable
Thanks Greg, I encountered the table paste error in trying to edit my original post so here is the sample data table:
Index Employee ID Record Date Attribute 1 000000001 3/1/2020 1 2 000000001 3/31/2020 2 3 000000001 4/5/2020 1 4 000000002 3/1/2020 2 5 000000002 3/31/2020 1 6 000000003 3/15/2020 1 7 000000003 3/31/2020 3 8 000000004 3/15/2020 1 9 000000004 4/15/2020 3 10 000000005 3/1/2020 1 11 000000005 4/1/2020 2