Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Parameters in Power BI

Hello All,

 

I am new to Power BI.

I have a page where I need to show my measure names based on a parameter

 

If parameter ='Sales' then sales value

else parameter ='Profit' then profit

 

I am not sure how to do this.

Could any one please help

  • Hi Anonymous 

    It sounds like dynamic measure name, however, the name of column or measure cannot be changed dynamically in Power BI Desktop. You can use slicer, then select the measures according to the slicer. In this scenario, it will not change the name of the measure, but the calculation expression.

    For example,

    (1) the measure below returns [Profit] when you select "Profit" in Slicer, as is "Sales"

    (2) Besides, you can use title function of that visual

    Steps:

     

    TitleMeasure = 
    SWITCH(TRUE(),
    MIN(Slicer[Column1])="Profit","Profit",
    MIN(Slicer[Column1])="Sales","Sales")

     

    result

    Best Regards,

    Community Support Team _Tang

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

2 Replies