Forum Discussion

Bobv013's avatar
Bobv013
New Member
1 year ago
Solved

Matrix: change measure name based on parameter selection.

Hi all,   I've created a matrix table which includes a measure and a parameter connected to it.  However whenever a certain parameter is selected I want the measure to not say 'geselecteerde param...
  • v-dineshya's avatar
    1 year ago

    Hi Bobv013 ,

    Thank you for reaching out to the Microsoft Fabric Community forum.

     

    1. Create a dynamic label measure

    Selected Parameter Label =
    VAR SelectedParam = SELECTEDVALUE('Selectie Parameter'[Selectie Parameter])
    RETURN
    SWITCH(
    SelectedParam,
    "Bruto_geboekte_premie_os", "Bruto geboekte premie os",
    "Bruto_verdiende_premie", "Bruto verdiende premie",
    "Netto_geboekte_premie_os", "Netto geboekte premie os",
    "Netto_verdiende_premie", "Netto verdiende premie",
    "Geselecteerde Parameter"
    )

    2. Replace "Geselecteerde Parameter" with this measure Geselecteerde Parameter

    To replace that label dynamically, In your matrix visual, remove the existing static row name. Add a new calculated measure placeholder row.

    Dynamic Value Measure =
    VAR SelectedParam = SELECTEDVALUE('Selectie Parameter'[Selectie Parameter velden])
    RETURN
    CALCULATE(SELECTEDPARAMETERMEASURE)

    Note: Replace SELECTEDPARAMETERMEASURE with your measure switch depending on the parameter selected. Use the Selected Parameter Label as a row value instead of hardcoding “Geselecteerde Parameter”.

     

    If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.