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
avo_om2134
Frequent Visitor

How to Filter multiple columns to count value?

Hi - I am fairly new to PBI and trying to understand how to filter / count value.

I'd ultimately like to filter the year and count or filter + count the number of red vs blue.

 

Am I able to write something in DAX to produce this?

 

2022red
2022red
2022red
2022blue
2023red
2023red
2023blue
2023blue

 

desired outcome:
2022 Red: 3; 2022 Blue: 1
2023 Red: 2; Blue: 2

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @avo_om2134 ,

If I understand correctly, the issue is that you want to filter the year and count the red and blue. To solve the issue, you can follow these steps:

1.Create a simple table.

vjiewumsft_0-1701914070478.png

2.Select the table visual onto the report canvas. Move the Data and color to the Columns.

vjiewumsft_1-1701914295628.png

3.Move the color to the Columns and select the count.

vjiewumsft_2-1701914352306.png

4.You can see the desired outcome.

vjiewumsft_3-1701914400255.png

Looking forward to your reply.

Best Regards,

Wisdom Wu

 

View solution in original post

2 REPLIES 2
Kavin_Mano620
New Member

Hi  avo_om2134

if you can use dax functions to grouping and count values

Step 1 : Click Data View your table (year  and  colour table ) and then the ribbon will show the table tools 

Step 2: Create new Table

step 3: 

Kavin_Mano620_0-1701934502829.png

use the code -

summarytable = SUMMARIZE(Yourtable,Yourtable[year],Yourtable[colour], "Count", COUNTROWS(Yourtable))
 
 
Anonymous
Not applicable

Hi @avo_om2134 ,

If I understand correctly, the issue is that you want to filter the year and count the red and blue. To solve the issue, you can follow these steps:

1.Create a simple table.

vjiewumsft_0-1701914070478.png

2.Select the table visual onto the report canvas. Move the Data and color to the Columns.

vjiewumsft_1-1701914295628.png

3.Move the color to the Columns and select the count.

vjiewumsft_2-1701914352306.png

4.You can see the desired outcome.

vjiewumsft_3-1701914400255.png

Looking forward to your reply.

Best Regards,

Wisdom Wu

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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