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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Sk1_2
Frequent Visitor

Filter one column in a matrix

Hello, 

 

How do I filter one column in a matrix? For example, I want to display the remainder of 2024 and January 2025. But the January column is only displaying 2024 numbers. How can I only filter the January column for the year 2025? 

Sk1_2_0-1726596709199.png

 

I can use a slicer but my manager wants it to be displayed. Any tips will be super helpful. 

 

Thank you in advance

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @Sk1_2 ,

Based on the description, try to create the new measure.

StaffCountOtherMonths = 
var _month = SELECTEDVALUE('Table'[Month name])
RETURN
IF(_month <> "Jan-2024", SUM('Table'[staff count]))

vjiewumsft_0-1726737282606.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-jiewu-msft
Community Support
Community Support

Hi @Sk1_2 ,

Based on the description, try to create the new measure.

StaffCountOtherMonths = 
var _month = SELECTEDVALUE('Table'[Month name])
RETURN
IF(_month <> "Jan-2024", SUM('Table'[staff count]))

vjiewumsft_0-1726737282606.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@Sk1_2 No, you would have to write a measure to do that kind of thing. Hard to really say though as there is extremely little information provided.

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you. I figured so. Please see sample data below and expected output. I would like to filter the month of January to only show data for 2025. Currently the month of January is displaying 2024

 October 2024November 2024December 2024 January 2025
Blue55510
Green66615
Yellow3337

 

Row: Project

Column: Month

Values: staff count

 

Thank You in advance,

@Sk1_2 So what is the source data for this as I assume this is the output you want?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Its SQL Server Database 

@Sk1_2 OK, I get that, but what does the table look like? Like this?

Column1, Column2, Column3

blue, 1/1/2024, 5

blue, 1/1/2025, 10

blue, 10/1/2024, 11

blue, 11/12/2024, 6

green, 1/1/2024, 5

green 1/23/2025, 7

 

These kinds of things really matter and it's not fun to guess or hand type a bunch of data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  Yes, thats what it looks like 

 

Column1, Column2, Column3

blue, 1/1/2024, 5

blue, 1/1/2025, 10

blue, 10/1/2024, 11

blue, 11/12/2024, 6

green, 1/1/2024, 5

green 1/23/2025, 7

Hi,

I do not understand.  Create a Calendar Table with a relationship to the Fact Table.  Create calculated columns of Year, Month name and Month number in the Calendar Table.  To your slicer, drag Year and Month name from the Calnda table.  select January 2025 there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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