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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.