Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
89 | |
87 | |
50 | |
34 | |
22 |