Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Field Parameters not working for any visual

Hi team, just signed up on this forum. Excited to be here! I'm trying to use field parameters to choose between metrics I want to display. I know its pretty straightforward since I watched a bunch o...
  • v-yalanwu-msft's avatar
    4 years ago

    Hi, Anonymous ;

    Since the newly generated field parameter Choose Metrics is a text type, the Y-axis requirement in the bar graph is value, which is the number type, so blank will be displayed here.


    Therefore, the following schemes can be used:

    1.create a new table.

    Newtable = {
        "UnitsInStock",
        "UnitsOnOrder"}

    2.create a measure.

    Measure = SWITCH(MAX('Newtable'[Value]),"UnitsInStock",SUM(Products[UnitsInStock]), "UnitsOnOrder",SUM(Products[UnitsOnOrder]))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.