Forum Discussion

Ronnie7's avatar
Ronnie7
Icon for Helper II rankHelper II
9 years ago
Solved

Data in table is not being filtered interactively based on a custom column in a chart

Hi All,

 

I have created a custom column that is looking at another column and chooses only 2 specific values (Yes, Pending), instead of the 3 available values,  please see below:

 

Column   = CALCULATE (
    COUNTA( Projects[PMAssigned]),
           ALL ( Projects[PMAssigned]),
        Projects[PMAssigned] = "Yes"
        ||Projects[PMAssigned] = "Pending" )

 

The code seems to work well. The problem is when i click this column in a clustered column chart. Below the chart, on the same page, I have a table. In the  table I have data containing some fields along with the PMAssigned field (the "vanilla" field from which im filtering data out in the custom field) , the data in the table is not being filtered interactively upon clicking the custom column in the chart. 

In order to have the data in the table  filtered out based on a column/value in the chart, I have to use the "Vanilla" column.

 

I want the data in the table to be filtered out interactively based on this custom column.

Is there anyway around it?

 

Thanks!

  • Sean's avatar
    Sean
    9 years ago

    So you want the chart to show a count of each of the values including the NO but the table only the Yes and Pending Numbers?

     

    To quickly test this just drag Projects[PMAssigned] to the Value area of the chart instead of the Measure

    You'll get a generic Count of... AND use my Measure only in the table!

     

    Again however if you have other Measures that don't have the same FILTER argument and therefore include the NO as answer

    then the NO will keep showing in the Table - hope this makes sense

    to test it leave only my Measure in the Table and the Projects[PMAssigned] field

     

    Good Luck! :smileyhappy:

7 Replies

  • Sean's avatar
    Sean
    Icon for Community Champion rankCommunity Champion

    Ronnie7

     

    Try this as a MEASURE!

     

    MEASURE =
    CALCULATE (
        COUNTA ( Projects[PMAssigned] ),
        FILTER (
            Projects,
            Projects[PMAssigned] = "Yes"
                || Projects[PMAssigned] = "Pending"
        )
    )

    This should do it! :smileyhappy:

    • Ronnie7's avatar
      Ronnie7
      Icon for Helper II rankHelper II

      SeanI have updated the formula, the problem is that now it shows the amount of total rows in the table reghardless on the

      filter Yes/Pending. The data in the table below the chart is still not changing according to the custom field.

       

      See schreenshot below (it shows all three values), any other suggestions?

       

      • Sean's avatar
        Sean
        Icon for Community Champion rankCommunity Champion

        Did you add the new MEASURE to the table?