1
votes

I have the following table:

enter image description here

I want to get counts of first_name and last_name. I want to then make a bar graph of the counts. I can accomplish this much by doing a power query with it grouped by first_name and last_name. But this eliminates the grade and year columns. Is there anyway to get the counts while still being able to filter on the year and grade columns?

1
it's task for DAX, not PQ (of course, you may do it in PQ too, but you shouldn't)Aleksei Zhigulin
Sample output would help understand your actual requirenent.mkRabbani

1 Answers

0
votes

You should be using DAX measured for that. I'm guessing you want to count distinct values:

First Names = DISTINCTCOUNT(Table[first_name])

Last Names = DISTINCTCOUNT(Table[last_name])

Put these measures in a visual and you're done.