Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I would like to create table that summarize my data:
Name | Status | Code |
Anna | Y | 1 |
Anna | Y | 2 |
Mark | Y | 3 |
Anna | N | 4 |
Anna | Y | 2 |
Mark | Y | 3 |
to following format:
Name | Codes |
Anna | 1, 2 |
Mark | 3 |
So the task is to create column thats joins distinct values with Status=Y from column Code to one String for each value in column Name.
Do you know is it possible to create using only DAX?
Solved! Go to Solution.
If you want to create a computed table, then use this (replace tbl with your table name)
SUMMARIZE(CALCULATETABLE(tbl, tbl[Status]="Y"),[Name],"Codes", CONCATENATEX(VALUES(tbl[Code]),[Code], ","))
If you want to create a computed table, then use this (replace tbl with your table name)
SUMMARIZE(CALCULATETABLE(tbl, tbl[Status]="Y"),[Name],"Codes", CONCATENATEX(VALUES(tbl[Code]),[Code], ","))
Thank you 🙂
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |