Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi i am going to create a new table in which show the two column from the below attached image
result:
In result it shows the count of prod_id against those column based on check.
like count of prod_id where bath column is bath and count of prod_id where shower column is shower and count of prod_id where large and small is true.
|
Please help me with it i want to do this through dax
Solved! Go to Solution.
Hi, @hammadafridi
You can try the following methods.
Table2 =
UNION (
SUMMARIZE (
'Table',
"type", "shower",
"count", COUNTAX ( FILTER ( 'Table', [shower] = "shower" ), [shower] )
),
SUMMARIZE (
'Table',
"type", "bath",
"count", COUNTAX ( FILTER ( 'Table', [bath] = "bath" ), [bath] )
),
SUMMARIZE (
'Table',
"type", "large",
"count", COUNTAX ( FILTER ( 'Table', [large] = TRUE ), [large] )
),
SUMMARIZE (
'Table',
"type", "small",
"count", COUNTAX ( FILTER ( 'Table', [small] = TRUE ), [small] )
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @hammadafridi
You can try the following methods.
Table2 =
UNION (
SUMMARIZE (
'Table',
"type", "shower",
"count", COUNTAX ( FILTER ( 'Table', [shower] = "shower" ), [shower] )
),
SUMMARIZE (
'Table',
"type", "bath",
"count", COUNTAX ( FILTER ( 'Table', [bath] = "bath" ), [bath] )
),
SUMMARIZE (
'Table',
"type", "large",
"count", COUNTAX ( FILTER ( 'Table', [large] = TRUE ), [large] )
),
SUMMARIZE (
'Table',
"type", "small",
"count", COUNTAX ( FILTER ( 'Table', [small] = TRUE ), [small] )
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@hammadafridi , In power query, Unpivot and group by
https://radacad.com/pivot-and-unpivot-with-power-bi
in Dax
Union and summarize
union(
summarize(Table, "Count" , count(Table[Bath]) ,"Column", "Bath" ) ,
summarize(Table, "Count" , count(Table[Shower]) ,"Column", "Shower" ) ,
summarize(Table, "Count" , count(Table[large]) ,"Column", "large" ) ,
summarize(Table, "Count" , count(Table[small]) ,"Column", "small" )
)
You can use distinct count if needed
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 83 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |