Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Create measure using secondary slicer

I have a page that has a parameter in a slicer with 4 dimensions. The 4 dimensions all have the same value ('Recevied Funding', 'Did not Receive Funding'). I've created a second slicer off of this, which shows the value of the selected dimension.

I also have 3 additional slicers that are not directly connected to the parameter.

 

My data has a field (customer count) that has the number of individuals who did, or did not, receive funding in the 4 categories, as well as the various values for the 3 additional variables (Demographic factors, so Sex, Race, Age).

 

I want to create a measure that shows the percent of customers that received funding for the selected parameter value, and any demographic variables that have been selected. So a numerator that accepts all filters, and a denominator that accepts all filters EXCEPT for the "Received Funding" splicer for the parameter variables.

5 Replies

  • Anonymous , If the table are connected simple count of sum measure will do , else use treatas for passing values

    SUM('Table'[customer count])

    or

     

    CALCULATE(
    SUM('Table'[customer count]),
    'Table'[Parameter] = "Received Funding"
    )

     

    Denominator can be

     

    CALCULATE(
    SUM('YourTable'[customer count]),
    REMOVEFILTERS('Table'[Parameter])
    )

     

    or

     

    CALCULATE(
    SUM('YourTable'[customer count]),
    filter(all('Table'), 'Table'[Parameter] <>"Received Funding" )
    )

     

    Add filter for other parameters if needed

    • Anonymous's avatar
      Anonymous
      Not applicable

      These give me a value of 100% across the board.

      The parameter is in a table generated by Power BI that is not connected to the main data table.

      When I try to implement the last suggestion (filter(all('Table'), 'Table'[Parameter] <> "Received Funding"), this generates an error (cannot find name).

      • Anonymous's avatar
        Anonymous
        Not applicable

        Here's what I wrote:

        Denominator = CALCULATE(
        SUM('SI'[Customer Count]),
        filter(all('SI'), 'Funding Sources'[Funding Sources] <>"2. Received Funding" )
        )

         

        The message I received:

        A single value for column 'Funding Sources' in table 'Funding Sources' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.