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.
Hi,
I'm building dashboard in Direct Query mode.
Data = Asatdate, UserID, Name, Ethnicity
I'd like to create a oclumn "Ethnicity Type" and to put values from Ethnicity column if the UserID field is not duplicate, if it is duplicate then put the latest value for Ethnicity by date.
Thank you in advance for the help.
Thanks
Atif
Solved! Go to Solution.
Thanks for replying Xiaoxin. I've found the solution via sql query :).
Hi @atifbutt,
Please share some sample data for test and coding formula.
Regards,
Xiaoxin Sheng
Thanks for replying Xiaoxin. I've found the solution via sql query :).
Could you kindly post the SQL solution?
Thanks
Select field1,field2,field3
from (select field1,field2, field3,
row_number() over (partition by employeenumber order by (datefield "to pick the latest record") desc) as rn from tablename) as T
Where RN = 1
Select field1,field2,field3
from (select field1,field2, field3,
row_number() over (partition by employeenumber order by (datefield "to pick the latest record") desc) as rn from tablename) as T
Where RN = 1
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |