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
Hi,
Can you please let me know if the following sql should give the same result as the followed DAX?
Thank you
select
p.[field1], count(distinct p.[field3]) AS "Mycount"
from
TableP AS p
INNER JOIN TableH AS h ON p.ID = h.ID
where
h.[field7] > 0
AND p.[field2] = 'some text'
group by
p.[field1]
having count(distinct p.[field3]) >= 2
--------------------------------------------------------
FILTER (
SUMMARIZE (
'TableP'
,'TableP'[field1],
'TableP'[field2],
"Mycount", DISTINCTCOUNT ( 'TableP'[field3] ),
),
[price] > 0
&& SEARCH ( "some text", 'TableP'[field2], 1, 0 )
&& not ISBLANK('TableP'[field3])
&& [MyCount] >= 2
)
Solved! Go to Solution.
You can go ahead with anything as long as it's giving the correct result.. 🙂
Thanks.
Try to use below DAX. Just replace your table and column names.
You can add more filters too.
FILTER( CALCULATETABLE( SUMMARIZECOLUMNS(DimProduct[EnglishProductName], DimProduct, "Mycount", DISTINCTCOUNT( FactInternetSales[OrderDate]) ) ), CALCULATE(DISTINCTCOUNT( FactInternetSales[OrderDate])) >= 3 && DimProduct[EnglishProductName]="some text" )
Thanks.
Hi,
This seems to be giving the similar result to my filter and summarize dax
You can go ahead with anything as long as it's giving the correct result.. 🙂
Thanks.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 18 | |
| 12 | |
| 11 |