Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Everyone knows how to create a table of distinct values from multiple columns but how about creating a table based on the distinct values of a single column?
The below formula creates a distinct table as needed but if an eventID had multiple regions it will still create multiple rows of the same eventID.
How do I change the DAX so that no matter what the eventID can only be pulled once (FIRST)?
NewTable = distinct(SELECTCOLUMNS('MyTable',"eventID",'MyTable'[eventID],"Region",'MyTable'[Region]))
Solved! Go to Solution.
I tested this. This should works. Could you please provide screenshot or sample data?
Table = SUMMARIZE(Mytable,Mytable[eventid],"region",min(Mytable[region]))
Proud to be a Super User!
@WorkHard , Try like
NewTable =summarize('MyTable','MyTable'[Region],"eventID" ,min('MyTable'[eventID]))
or //when you min region
NewTable =summarize('MyTable','MyTable'[eventID],"Region" ,min('MyTable'[Region]))
the min() method gives me a "Parameter is not the correct type". Both columns are type string.
I tested this. This should works. Could you please provide screenshot or sample data?
Table = SUMMARIZE(Mytable,Mytable[eventid],"region",min(Mytable[region]))
Proud to be a Super User!
have you tried summarized?
table = summarized('MyTable',"eventID",'MyTable'[eventID],"Region",'MyTable'[Region])
Proud to be a Super User!
Yes, summarize does the same thing, it will still duplicate the event ID.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
87 | |
82 | |
65 | |
63 | |
57 |
User | Count |
---|---|
171 | |
113 | |
110 | |
73 | |
73 |