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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
I am trying to calculate like SQL query using dax function.
SELECT COUNT(*) FROM TABLE
WHERE ID IN (SELECT ID FROM TABLE WHERE TYPE = 'ISSUE')
AND TYPE = 'USE';
Can anyone teach me how to use dax function and filter from below table?
Thank you in advance.
Solved! Go to Solution.
@Anonymous , Try like
measure =
var _tab = summarize(filter(allselected(Table),Table[TYPE] = "ISSUE"), Table[ID])
return
countrows(filter(Table,Table[TYPE] = "USE" && Table[ID] in _tab))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
@Anonymous , Create a measure like
measure =
var _tab = summarize(filter(Table,Table[TYPE] = "ISSUE"), Table[ID])
return
countrows(filter(Table,Table[TYPE] = "USE" && Table[ID] in _tab))
Thank you for your answer.
I tried the way you told me.
But I don't know why "2022-01-02", "2022-01-03" doesn't come out of the results like below.
@Anonymous , Try like
measure =
var _tab = summarize(filter(allselected(Table),Table[TYPE] = "ISSUE"), Table[ID])
return
countrows(filter(Table,Table[TYPE] = "USE" && Table[ID] in _tab))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thank you so much!!!
I solved it with the answer:)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.