Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear fellow developers,
I am quite new to DAX, but familiar with SQL. So I would like to explain what I want to achieve in DAX, using an SQL example:
SELECT col1, col2, col3
FROM table1
WHERE col1 IN
(SELECT col1
FROM table1
GROUP BY col1
HAVING COUNT(*) > 1)
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous ,
Please try below steps
1.my test table
Table:
2. create a new table by below dax formula
Table 2 =
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[Col1] ),
FILTER (
SUMMARIZE ( 'Table', 'Table'[Col1], "Count_Rows", COUNT ( 'Table'[Col2] ) ),
[Count_Rows] > 1
)
)
RETURN
FILTER ( 'Table', 'Table'[Col1] IN tmp )
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try below steps
1.my test table
Table:
2. create a new table by below dax formula
Table 2 =
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[Col1] ),
FILTER (
SUMMARIZE ( 'Table', 'Table'[Col1], "Count_Rows", COUNT ( 'Table'[Col2] ) ),
[Count_Rows] > 1
)
)
RETURN
FILTER ( 'Table', 'Table'[Col1] IN tmp )
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like the attached.
I hope the attached file can provide some ideas on how to create a solution for your dataset.
Thank you Jihwan Kim!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 26 | |
| 17 | |
| 11 | |
| 10 |