Forum Discussion
sunny27
7 years agoFrequent Visitor
SQL to DAX
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 ...
v-jiascu-msft
7 years agoMicrosoft Employee
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