Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I am trying to figure out how to count observations in a very particular way. my sample data and the resulting table I want to replicate in Power Bi are displayed in the image below.
I have a table of students who visited different schools in our district. I need need to count unique observations but I also need to give credit to each school for serving the student. In excel I do this by manually filtering the table by school year, school and month then counting the number of observations. I have tried myltiple dax formulas but have been unsussucessful in creating something that replicates this counting method. I want to have this in one visual just like I created in the excel sheet. Any help would be appreciated. Thanks
Solved! Go to Solution.
Hi @mhernandez77,
Please download the demo in the attachment. If you need the visual to show 0, a measure is needed.
ID Counts = VAR temp = DISTINCTCOUNT ( Table1[Visitor ID] ) RETURN IF ( ISBLANK ( temp ), 0, temp )
Best Regards,
Dale
Hi @mhernandez77,
Please download the demo in the attachment. If you need the visual to show 0, a measure is needed.
ID Counts = VAR temp = DISTINCTCOUNT ( Table1[Visitor ID] ) RETURN IF ( ISBLANK ( temp ), 0, temp )
Best Regards,
Dale
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |