Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with ID, date and Name
ex.
101 3/12/2018 John
101 3/14/2018 John
101 3/16/2018 Adam
So THe issue is that I am trying to display information so that I see my First and Last values for each of these values.
The issue is that when they are in a table, POwer BI shows me the last and first values in alphabetical order rather than corresponding to the value of their date. So ex. Adam will be under first and John under Last. How can I filter the row so that the name value looks at the date correctly to determine if it is the last or first?
This is what I get now:
Id FirstDate FirstName LastDate LastName
101 3/12/2018 Adam 3/16/2018 John
THe final result:
Id FirstDate FirstName LastDate LastName
101 3/12/2018 John 3/16/2018 Adam
Solved! Go to Solution.
You may just modify the measure above using dax like pattern below:
FirstName = CALCULATE ( MAX ( Table[Name] ), FILTER ( ALLEXCEPT ( Table, Table[ID] ), Table[Date] = MIN ( Table[Date] ) ) ) LastName = CALCULATE ( MAX ( Table[Name] ), FILTER ( ALLEXCEPT ( Table, Table[ID] ), Table[Date] = MAX ( Table[Date] ) ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You may just modify the measure above using dax like pattern below:
FirstName = CALCULATE ( MAX ( Table[Name] ), FILTER ( ALLEXCEPT ( Table, Table[ID] ), Table[Date] = MIN ( Table[Date] ) ) ) LastName = CALCULATE ( MAX ( Table[Name] ), FILTER ( ALLEXCEPT ( Table, Table[ID] ), Table[Date] = MAX ( Table[Date] ) ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try createing 2 measures
Help when you know. Ask when you don't!
Hey thanks for your effort. It didn't work. It just gave me the same date value for each row.
I am essentially looking for :Find the last insurance name where date is max, find the last insurance name where date is min
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |