Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi folks,
I want to achieve the following SQL in Power BI DAX :
select count(Parent.RegNum)
from WorkItem Parent
inner join WorkItem Child on (Parent.SourceRegNum = Child.RegNum)
where Child.ItemCode='Template'
and Parent.IsDeleted='False'
My objective is to display count(parent.RegNum) against each child.RegNum in a chart. I know this is achievable if I had two different tables, one for Parent and one for Child using the DAX below :
countRows = VAR template = CALCULATE(COUNTROWS(Parent), FILTER(Parent, 'Parent'[SourceRegNum] = 'Child'[RegNum])) VAR template_final = IF(template > 0, template , 0) RETURN template _final
& using Child.ItemCode='Template' and Parent.IsDeleted='False' as Page level filter.
But unfortunately this doesn't work since I am having one one table(Parent).
Any suggestions would be greatly appreciated.
@dax , @Anonymous
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |