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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.