Forum Discussion
DAX Calculated Table
I'm trying to create a calculated table based on a table with a colum for USER ID and EVENT ID (among others).
I need to create a table showsing disting USER ID's for only specific EVENT ID's.
I've been trying to use the filter and disting functions but I'm not getting anywhere. Any help would be appreciated.
EDIT:
I think I may have figured this out with SUMMARIZECOLUMNS:
CALCULATED TABLE = SUMMARIZECOLUMNS('Original Table'[USERID], FILTER('Original Table', 'Original Table'[EVENTID] = "SPECIFIC EVENT ID"))
Hi bwelsh,
Please use the formula below to create new table.CALCULATED TABLE = DISTINCT( SELECTCOLUMNS(FILTER('Original Table', 'Original Table'[EVENTID] = "SPECIFIC EVENT ID"),"EVENTID",'Original Table'[EVENTID],"SPECIFIC EVENT ID",'Original Table'[SPECIFIC EVENT ID]))
Best Regards,
Angelia
4 Replies
- v-huizhn-msftMicrosoft Employee
Hi bwelsh,
Please use the formula below to create new table.CALCULATED TABLE = DISTINCT( SELECTCOLUMNS(FILTER('Original Table', 'Original Table'[EVENTID] = "SPECIFIC EVENT ID"),"EVENTID",'Original Table'[EVENTID],"SPECIFIC EVENT ID",'Original Table'[SPECIFIC EVENT ID]))
Best Regards,
Angelia - parry2kSuper User
here are the steps:
- click edit query
- select both user id and event id column
- right click on the header and click remove duplicates
you will get disctinct rows