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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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