Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello All,
Can you please help me to write SQL query in DAX please. Below is the query
select count(*) from(
SELECT * FROM A WHERE ABTypeID
IN (10,11,12,13) and
BAID IN
(SELECT BAID FROM AB WHERE
CAID IN
(select CAID from ABC)))
Thanks!!
Hi @sunny27,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @sunny27,
It could be like below. But it depends on the data model structure. If you want a precise one, please provide a sample.
Measure =
VAR baids =
CALCULATETABLE ( VALUES ( ab[baid] ), ab[caid] IN VALUES ( abc[caid] ) )
RETURN
CALCULATE (
COUNTROWS ( a ),
a[abtypeid] IN { 10, 11, 12, 13 }
&& a[baid] IN baids
)
Best Regards,
Dale
You will need this add in tool from now on if you are building a lot of DAX queries in Excel for PowerPivot and Tabular.
Go To this link:
http://daxstudio.org/downloads/
Select the most current, first, download.
You can just run it after the download as a standalone app or open Excel and run it under Add In.
DaxStudio has everything you need.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 40 | |
| 39 | |
| 38 |