Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I would like to create a Card visual that displays a count of filtered values. I would like to do this without creating extra measures or calculated fields/tables, as end users (with limited knowledge) should be able to understand and follow along.
Example:
I have a table 'Products' with 3 records:
ProductID | ProductName |
1 | Chair |
2 | Table |
3 | Stool |
and table 'Product Weights' with 3 records (in my case the 'ProductWeight' field is used as a measure):
ProductID | ProductWeight |
1 | 4 |
2 | 5 |
3 | 6 |
I want to create one Card visual that displays the total count of products (3), and one that displays the count of products with price < 5 (1). Unfortunately, it is not possible to apply a filter to a measure before the values are aggregated (counted).
Does anyone have suggestions on how to achieve this? I am open to using other kinds of (third party) visuals.
Hi @Bend-IT ,
You can first go to query editor>filter "weight is less than 5":
Then go back to Report view>create a card view>put the weight column inside>right click on the field,choose:count;
And you will see:
For the related .pbix file,pls click here.
And how would you go about showing the other card (with '3') at the same time? Without sketchy workarounds such as duplicating the query?
I have a strong feeling this is not possible. I think I'll submit an idea to enable us to filter data before it's aggregated.
Hi @Bend-IT ,
Using query editor in your case will be a little limited,and dax should be a best solution for you,if you donnt wanna use dax ,you can create a support ticket via below link and our relevant personnel will help to handle it.
https://powerbi.microsoft.com/en-us/support/
@Bend-IT , Is these option not working?
calculate(count(Table[ProductID ]),Table[ProductWeight]<5)
Or
calculate(count(Table[ProductID ]),filter(Table,Table[ProductWeight]<5))
Thanks for your reply, but your solution can't be used unfortunately because it requires the user to know/use DAX.
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 |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |