Forum Discussion

puru85's avatar
puru85
Icon for Helper II rankHelper II
2 years ago
Solved

Multi-Select Measures in Line Chart

Hello Experts,

I have a requirement to display default measures, "Total Sales" and "Total Profit," in a Line chart, which I have successfully achieved.

Additionally, I am able to dynamically select measures such as "Discount," "Profit," "Qty," and "Sales."

However, I am encountering an issue with multi-selecting these measures ("Discount," "Profit," "Qty," and "Sales").

PBIX is attached in this link : Dyamnic Line Chart - Multi Select Measures.pbix

Thank you in advance. 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi puru85 ,
    Thanks for mh2587 and parry2k reply.
    Here's what I want to add:
    Create a Filed Parameter

    Create a column in Parameter table

    Measure Name = 
    IF(
        Parameter[Parameter] = "Discount",
        "Discount",
        "Qty"
    )

     

     


    Create relationship between "Parameter[Measure Name]" and “Dynamic Measure[Measures]”

     

    Create a measure

    Measure = 
    IF(
        SELECTEDVALUE('Dynamic Data'[Measures]) IN VALUES(Parameter[Measure Name]),
        1,
        0
    )

    Slicer settings


    In line cahrt field use "Total profit","Total Sales",“Parameter”

    Final output

     

    Best regards,
    Albert He

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

     

     

     

     

7 Replies

  • parry2k mh2587 

    Thank you very much for solution.

    One of my requirement is by Default, The line chart should show "Total Sales" and "Total Profit". Up on selection of  any parameter, that particular parameter metrics should be displayed in Line chart. 

    How to achive this ? Please suggest. 

    Thank you!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi puru85 ,
      Thanks for mh2587 and parry2k reply.
      Here's what I want to add:
      Create a Filed Parameter

      Create a column in Parameter table

      Measure Name = 
      IF(
          Parameter[Parameter] = "Discount",
          "Discount",
          "Qty"
      )

       

       


      Create relationship between "Parameter[Measure Name]" and “Dynamic Measure[Measures]”

       

      Create a measure

      Measure = 
      IF(
          SELECTEDVALUE('Dynamic Data'[Measures]) IN VALUES(Parameter[Measure Name]),
          1,
          0
      )

      Slicer settings


      In line cahrt field use "Total profit","Total Sales",“Parameter”

      Final output

       

      Best regards,
      Albert He

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

       

       

       

       

      • puru85's avatar
        puru85
        Icon for Helper II rankHelper II

        Hi Anonymous,

        Thank you very much for deatiled information on the implementation. However your current PBIX is not exactly achiving my requirement. 

         Let me share you the requirement here with visual reference:

        By Default, The line chart should show "Total Sales" and "Total Profit".  Below is the snap shot for reference.

        However, When user select any parameter in filter, that particular measure should be displayed with multi select option.  Below for referece.

        Hope you can help me with this!

        Thank you!




  • Anonymous  mh2587 parry2k 

    If possible, Please help on my requirement, Please refer to my latest reply to Anonymous . 

    Thank you!