Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a scatterplot for which the marker size is based on the count of IDs by category. The categories are also used in legend and filter.
| ID | Cat | x | Y |
| 1 | A | 0 | 0 |
| 2 | A | 0 | 0 |
| 3 | B | 0 | 0 |
| 4 | A | 22.7 | 46.05 |
| 5 | C | 73.7 | 76.91 |
| 6 | A | 73.7 | 95.16 |
| 7 | B | 11.3 | 75.56 |
| 8 | B | 28.3 | 0 |
| 9 | C | 85.0 | 0 |
The issue I'm having is that when a filter is applied to view only one of the subcategories, the size of the markers change. How do I adjust my formula so that the size is not affected by a filter?
Size = CALCULATE(SUM(Table1[ID]),ALLEXCEPT(Table1,Table1[Cat]))
Thanks!
Hi @KDS
The current measure you're using is using SUM to add all of the IDs together. Are you able to switch this to a COUNT?
Size = CALCULATE ( COUNT( Table1[ID] ) , ALLEXCEPT ( Table1 , Table1[Cat] ) )
Below is without Cat filter applied:
Here is with Cat applied:
I hope this is what you were wanting? If not, let me know. PBIX is also attached.
Thanks heaps,
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@TheoC Thanks for your reply. I don't know why I typed Sum in my question, count is what I actually have in my formula But every time I filter on category it resizes the markers. I think my issue is that the category is also in my legend to differentiate the different markers. When I added the categories to the legend in your example, I ran into the same issue I'm having in mine -- it resizes when I filter on category.
Also, mine was set up differently (this was created by someone else - I'm just trying to find a solution to the problem stated above) ... I have values blank, and X & Y are set to do not summarize, and cat in the legend. The only reference to ID is in the formula for the bubble size.
Hi @KDS
No worries at all. If you set up your Scatter like follows, your problem should be fixed:
Below is unfiltered screenshot:
Here is a filtered screenshot:
It should achieve what you are after in that you have the "size" and "legend" showing on the unfiltered scatter, and then the filtered removes the issue with the resizing.
Hope this helps!
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 131 | |
| 105 | |
| 60 | |
| 56 | |
| 55 |