Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

slicers

Hi, I have created a very simle line chart with time on the x horizontal axis and quatity on the y vertical axis.  I have three data sets showing three separate lines - how do I get a slicer to operate on the three data lines ie able to select which or how many lines are shown?  Any help appreciated.

  • MFelix's avatar
    MFelix
    7 years ago

    Hi Anonymous ,

     

    You measures for each column should be something like this:

     

    Measure G = 
    IF (
        CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure G" );
        SUM ( Table1[G] );
        BLANK ()
    )
    
    Measure M =
    IF (
        CONTAINS ( MeasuresSelection; MeasuresSelection[Measure]; "Measure M" );
        SUM ( Table1[M] );
        BLANK ()
    )

    Then add this measures to your chart and the slicer based on the measure selection table.

     

    See attach PBIX file.

     

    Regards,

    Mfelix

  • MFelix's avatar
    MFelix
    7 years ago
    How do you have the slicer table setup?

    Do not make any relationship with your data table.

    Regards,
    MFelix

14 Replies

  • Hi Anonymous ,

     

    Check this video that contains a description how to have turn off and on slicer for measures in a chart.

     

    Regards,

    MFelix

    • Anonymous's avatar
      Anonymous
      Not applicable

      The video was excellent as a new starter to Power BI.  I have not yet got the solution to work with my datasets so will try again today.  I create the tables but the line graph refuses to follow the slicer selections.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Still no luck, followed video to the letter and still only get the table and slicer to work in harmony - the chart remains unaffected my slicer selections.

      • MFelix's avatar
        MFelix
        Super User

        Hi Anonymous ,

         

        Can you share a sample of your file please?

         

        If the information is sensitive please shared it trough private message.

         

        Regards,

        MFelix