Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have the following query to create groups where an entity exists in more than 1 group
ie
User 1, Mobile
User 1, Desktop
=
User 1, Mobile,Desktop
My issue is where I have a different primary groups but the same secondary group it creates the following
Facebook,Mobile,Mobile
Mobile
Mobile,Desktop
Mobile,Mobile
Where as I want the results grouped like
Facebook,Mobile
Mobile
Mobile,Desktop
Below is the current DAX syntax I am using, can anyone help ?
Thanks in advance
Attributes = ADDCOLUMNS(
GROUPBY(
Control,
Control[UUID]
),
"PrimaryGroup",
CALCULATE(
CONCATENATEX(Control, Control[PrimaryGroup], ","),Control[IsFootfall] = 0),
"SecondaryGroup",
CALCULATE(
CONCATENATEX(Control, Control[SecondaryGroup], ","),Control[IsFootfall] = 0)
)
Solved! Go to Solution.
Try this one
Attributes =
ADDCOLUMNS (
GROUPBY ( Control, Control[UUID] ),
"PrimaryGroup", CALCULATE (
CONCATENATEX (
VALUES ( Control[PrimaryGroup] ),
Control[PrimaryGroup],
",",
Control[PrimaryGroup]
),
Control[IsFootfall] = 0
),
"SecondaryGroup", CALCULATE (
CONCATENATEX (
VALUES ( Control[SecondaryGroup] ),
Control[SecondaryGroup],
",",
Control[SecondaryGroup]
),
Control[IsFootfall] = 0
)
)
Please Give this a shot
Attributes =
ADDCOLUMNS (
GROUPBY ( Control, Control[UUID] ),
"PrimaryGroup", CALCULATE (
CONCATENATEX ( VALUES ( Control[PrimaryGroup] ), Control[PrimaryGroup], "," ),
Control[IsFootfall] = 0
),
"SecondaryGroup", CALCULATE (
CONCATENATEX (
VALUES ( Control[SecondaryGroup] ),
Control[SecondaryGroup],
","
),
Control[IsFootfall] = 0
)
)
Thanks Zubair that is really useful, it has grouped most of them - although its still not grouping I would expect.
these are my results
Desktop
"Desktop,Mobile"
Facebook
"Facebook,Desktop"
"Facebook,Desktop,Mobile"
"Facebook,Mobile"
"Facebook,Mobile,Desktop"
Mobile
"Mobile,Desktop"
Try this one
Attributes =
ADDCOLUMNS (
GROUPBY ( Control, Control[UUID] ),
"PrimaryGroup", CALCULATE (
CONCATENATEX (
VALUES ( Control[PrimaryGroup] ),
Control[PrimaryGroup],
",",
Control[PrimaryGroup]
),
Control[IsFootfall] = 0
),
"SecondaryGroup", CALCULATE (
CONCATENATEX (
VALUES ( Control[SecondaryGroup] ),
Control[SecondaryGroup],
",",
Control[SecondaryGroup]
),
Control[IsFootfall] = 0
)
)
Thats awesome, thank you!
I have the following query to create groups where an entity exists in more than 1 group
ie
User 1, Mobile
User 1, Desktop
=
User 1, Mobile,Desktop
My issue is where I have a different primary groups but the same secondary group it creates the following
Facebook,Mobile,Mobile
Mobile
Mobile,Desktop
Mobile,Mobile
Where as I want the results grouped like
Facebook,Mobile
Mobile
Mobile,Desktop
Below is the current DAX syntax I am using, can anyone help ?
Thanks in advance
Attributes = ADDCOLUMNS(
GROUPBY(
Control,
Control[UUID]
),
"PrimaryGroup",
CALCULATE(
CONCATENATEX(Control, Control[PrimaryGroup], ","),Control[IsFootfall] = 0),
"SecondaryGroup",
CALCULATE(
CONCATENATEX(Control, Control[SecondaryGroup], ","),Control[IsFootfall] = 0)
)
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |