Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bend-IT
Frequent Visitor

Display count of dimension values without using measures or calculated fields

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:

 

ProductIDProductName
1Chair
2Table
3Stool

 

and table 'Product Weights' with 3 records (in my case the 'ProductWeight' field is used as a measure):

 

ProductIDProductWeight
14
25
36

 

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.

5 REPLIES 5
Anonymous
Not applicable

Hi  @Bend-IT ,

 

You can first go to query editor>filter "weight is less than 5":

Annotation 2020-06-11 142605.png

Then go back to Report view>create a card view>put the weight column inside>right click on the field,choose:count;

Annotation 2020-06-11 142815.png

And you will see:

Annotation 2020-06-11 142853.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

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. 

Anonymous
Not applicable

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/

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@Bend-IT , Is these option not working?

 

calculate(count(Table[ProductID ]),Table[ProductWeight]<5)

Or
calculate(count(Table[ProductID ]),filter(Table,Table[ProductWeight]<5))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your reply, but your solution can't be used unfortunately because it requires the user to know/use DAX.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors