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.
I'm pulling my hair out here, and could really use a hand.
The situation is that I've got a table with one measure "attendance". I've pasted a sample of the data below as well.
I can easily make a visualization, filtered where the attendance is less than or equal to .95:
You'll notice that the values in the visualization are filtered already, and what I want to do is to do a row count on that result as you see it, after the <= .95 filter has been applied. What I want to do is create a table visualization that looks like this:
attendance number of students
---------- ------------------
.95 2
.94 2
.93 1
.92 1
The trick really is to be able to "use" those measures in another visualization after they've been calculated and the filters applied. I've been searching for many hours, much longer than I care to admit. I could really use a hand here.
A sample of the raw data is below. Thank you for your help in advance.
Solved! Go to Solution.
Hi @new_pbi_user,
Download my solution from here.
Hope this helps.
@new_pbi_user when you say use those measures, what is the issue with just placing the student count on the same visual - not quite understanding what you want to do? or do you just want that value?
you can always create your attendance as a calculated column and then filter by it rather than creating it by a measure
total students less or equal to 95% =
CALCULATE ( SUM ( table[student] ), attendance <= 0.95 )
Proud to be a Super User!
Thank you for the reply.
Putting the student count on the same visual doesn't work the same way. It is counting all the rows, no matter what the attendance is. This is what it looks like, and it isn't what I want.
What I want to see is how many students have what attendance. Two students have .95, two students have .94, etc.
Your suggestion to create a column out of attendance instead of a measure is a good one; it doesn't work but I don't understand what I'm doing wrong. This is the column, same as the measure:
But when I put it in the visual, the visual puts the attendance_col equal to this 172.9, which I would have to dig in and figure out how it came up with that. You may have a point, but I don't understand why it is doing what it is doing.
I will say to you these visuals and tests are good for learning, but ultimately I don't care, I just want to be able to count the number of students with the corresponding attendance. I have to be missing something here, I must be. This is a common thing to have to do with a measurement, I would think.
Thank you very much for looking at this question. I'm very close to hanging this up and doing this with SSRS and dynamic querying from the database. This type of thing is very easy to do with SQL and querying with each filter change. I'm obviously missing something.
Absolutely, here it is. Thank you a ton for looking at it. You can download the pbix file from this link:
https://1drv.ms/f/s!AiiIadlG4mKmb0hbieh5e1DI910
Hi @new_pbi_user,
Download my solution from here.
Hope this helps.
Ashish, this isn't exactly what I had in mind but I can make use of it to make things work. Thank you so much for your time and for posting it. You have helped me out and taught me something as well. Thank you again.
You are welcome.
Hi,
Share the link from where i can download your file.
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |