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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fazad
Regular Visitor

Filtering certain columns out from matrix view

Hi All,

 

I'm having an issue with regards to the matrix functionality on power BI.

 

I have imported the following work book from excel.

 

bi1.PNG

 

When I generate the matrix in power BI, I'm getting blanks for projected sales for the first 2 years. I do not want to show those columns and only want to show the projected sale column for 2019 year only. Any idea how I can remove those views from matrix? If I try to use the exclude button and try to exclude project sales only, it removes the entire year and total sales cloumn as well.

 

bi2.PNG

 

Any advice or help would be appreciated.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @fazad,

 

For your requirement, you could create a calculated column to achieve your desired output.

 

Column =
VAR sum_of_project_sales =
    CALCULATE (
        SUM ( 'Table1'[Projected Sales] ),
        ALLEXCEPT ( Table1, Table1[Year] )
    )
RETURN
    IF ( ISBLANK ( sum_of_project_sales ), 0, 1 )

Then you could drag the calculated column to visual level filter and set like below.

 

Untitled.png

 

 

More details, please refer to the attachement.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
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

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution in this PBI file.  My numbers are different from yours because i created a summy dataset.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @fazad,

 

For your requirement, you could create a calculated column to achieve your desired output.

 

Column =
VAR sum_of_project_sales =
    CALCULATE (
        SUM ( 'Table1'[Projected Sales] ),
        ALLEXCEPT ( Table1, Table1[Year] )
    )
RETURN
    IF ( ISBLANK ( sum_of_project_sales ), 0, 1 )

Then you could drag the calculated column to visual level filter and set like below.

 

Untitled.png

 

 

More details, please refer to the attachement.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherry, Apologies for the late reply, your advice worked, thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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