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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ovonel
Post Prodigy
Post Prodigy

When I add a measure, the filter does not work

I display in a matrix visual in Power BI:

 

Rows:  

  • Client[Parent]
  • Client[Name]

 

Values:

  • Fact[Revenue]
  • MeasureResp

 

Code for MeasureResp:

 

IF (

    ISINSCOPE ( 'Client'[Name] ),

    MAX ( 'Client'[Responsible] ),

    CALCULATE (

        FIRSTNONBLANK ( 'Client'[Responsible], 1 ),

        FILTER (

            'Client',

            'Client'[Client Number (Legacy)] = 'Client'[Client Number]

        )

    )

)

 

 

(When the matrix is expanded; it returns the responsible for each client, but when it is collapsed, it will find the Responsible where Legacy=Client Number)

 

I also have a filter on another Dimension that I use:  Dimension2[Rep]

 

They filter does not work, it only works if I remove MeasureResp? Why is this?

1 REPLY 1
lbendlin
Super User
Super User

You need to put Client[Client Number] into a variable outside the CALCULATE().  Otherwise your filter only works on row level.

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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