Forum Discussion
Anonymous
5 years agoNot applicable
Remove duplicates in DAX
Hi Guys, Edit: Proving more informations I have this two different tables, the fact table (many ids) and my time table (unique id) TABLE 1 FACT TimeID ID start time finish time 1 ...
- 5 years ago
edhans
Community Champion
5 years agoIt is possible, but not the way you have your data. If I use the MIN() function, I get this:
MAX() would have returned Morning for ID1, but the problem is Power BI doesn't know what "Morning" and "Afternoon" are. Instead, MIN/MAX are working alphabetically here.
And since your data isn't alphabetical, MIN/MAX won't work. For example, MIN returns afternoon in this example, but if you had Morning and Evening for some IDs, MIN there would return Evening because E is before M. You need another field to define the order to take your data and pull that. Or convert Morning, Afternoon, Evening into 8am, 12 noon, 6pm as a time field. Then MIN/MAX would work fine.