Forum Discussion

paw1's avatar
paw1
Icon for Helper I rankHelper I
3 years ago
Solved

Field Parameter in Power BI

Hi,

Please help me on below requirement.

I have a source table like below.

Source:

 

 

Field Parameter: I have created a Field Parameter with NGT and Impact like below. Requirement is when NGT is selected only NGT=Yes related data need to be filter in below chart i.e., Retail Data. When Impact is selected only Impact =yes need to be filter in below chart i.e., Healthcare and Retail. But now the filter selection is not working in chart. Please  help me on this .

Chart:

 

Thanks in advance.

 

 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi paw1 

    You can refer to the following example

    Para table

    Parameter = {
        ("NGT", NAMEOF('Table'[NGT]), 1),
        ("Impact", NAMEOF('Table'[Impact]), 2)
    }

     

    Then create a measure

    Measure = SWITCH(TRUE(),SELECTEDVALUE(Parameter[Parameter Order])=1,CALCULATE(SUM('Table'[Number of Records]),'Table'[NGT]="Yes"),SELECTEDVALUE(Parameter[Parameter Order])=2,CALCULATE(SUM('Table'[Number of Records]),'Table'[Impact]="Yes"),SUM('Table'[Number of Records]))

    Output

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi paw1 

    You can refer to the following example

    Para table

    Parameter = {
        ("NGT", NAMEOF('Table'[NGT]), 1),
        ("Impact", NAMEOF('Table'[Impact]), 2)
    }

     

    Then create a measure

    Measure = SWITCH(TRUE(),SELECTEDVALUE(Parameter[Parameter Order])=1,CALCULATE(SUM('Table'[Number of Records]),'Table'[NGT]="Yes"),SELECTEDVALUE(Parameter[Parameter Order])=2,CALCULATE(SUM('Table'[Number of Records]),'Table'[Impact]="Yes"),SUM('Table'[Number of Records]))

    Output

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.