Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi Power Bi Community,
I am so glad to find such a big community that are willing to help others!
Could you please help me out!
To simplify things, I have 'Fruit' visual table with the following:
| ID | Fruit Selected | Date Selected | Time Selected |
| 1 | Banana | 15/3/2022 | 10:41pm |
| 1 | Banana | 15/3/2022 | 11:41pm |
| 1 | Apple | 15/3/2022 | 11:41pm |
| 2 | Banana | 15/3/2022 | 9:10pm |
| 2 | Apple | 15/3/2022 | 10:10pm |
I want the table to be able to return me the below instead:
| ID | Fruit Selected | Date Selected | Time Selected |
| 1 | Banana | 15/3/2022 | 10:41pm |
| 1 | Apple | 15/3/2022 | 11:41pm |
| 2 | Banana | 15/3/2022 | 9:10pm |
| 2 | Apple | 15/3/2022 | 10:10pm |
See how it filterd out the duplicate banana that was selected on later time for the same ID.
I want a DAX formula/measure that able to perform this for me.
Please note, the measure must be able to work in a DirectQuery mode.
Thank you!!!!
Solved! Go to Solution.
First Time = SELECTCOLUMNS( TOPN( 1,'Table', 'Table'[Time Selected],ASC), "@time", 'Table'[Time Selected] )
create this as a measure and put it in a table visual with the ID, fruit and date columns
First Time = SELECTCOLUMNS( TOPN( 1,'Table', 'Table'[Time Selected],ASC), "@time", 'Table'[Time Selected] )
create this as a measure and put it in a table visual with the ID, fruit and date columns
Hi Johnt75,
Thank you for your support.
I have created the above measure but it return date and time in one column instead, it did not eliminate the duplicate text values. 😥
Make sure that the selected date and selected time columns are separate columns and that they have the correct types - the selected date column should be a date type, not a datetime, and the selected time column should be a time type.
You may also need to change the display format of the measure to just show the time
You are a legend! Thank you so much! You have saved me. 🤗
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |