Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
Below a simplified view of the model I use for my calculations.
I've made a measure (count) of FileNumber. In that table the complaint_ID and FileNumber are unique.
Count FileNumber generates: 1000 unique FileNumbers
In order to count FileNumbers on Department (Table 2) and on Subject (Table 3) I made following dax:
Calculate ( measureFileNumber, crossfilter ( Table1[complaint_ID], Table2[complaint_ID], 2), crossfilter ( Table2[cyclus_ID], Table3[Cyclus_ID],2 ) )
So far so good because it 'works': it's returning a unique measureFileNumber on level of Department and Subject.
But in reality one FileNumber can affect more then one Department or more then one Subject.
example:
FileNumber 2018-800 relates to 2 department and relates to 2 Subjects.
2018-800 / Department 1 / Subject 1
2018-800 / Department 2 / Subject 1
2018-800 / Department 2 / Subject 2
In this case, the MeasureFileNumber should return 3 instead of 1 when displayed in a Card-visual
I've been trying with sumx (solution I found on the community), combined with the different sorts of 'counts' but without the expected result.
Can someone please assist me in finding the correct dax formula?
Thanks in advance.
Solved! Go to Solution.
Please try a measure like this one
Subject Count = COUNTROWS(SUMMARIZE(Table3, Table3[Subject], Table2[Complaint_ID], Table2[Department]))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Please try a measure like this one
Subject Count = COUNTROWS(SUMMARIZE(Table3, Table3[Subject], Table2[Complaint_ID], Table2[Department]))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi Pat,
This solution works excellent! Thanks a lot.
Wim
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |