Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Slicer related question

Hello Experts,

 

I have a requirement on a line graph to selets the lines based on Slicer value. Below is graph show and a slicer for the month.

Each line comes from a separate JSON source for each month.

The help need is - to select the month on the slicer which should show onyl that month's line in the graph.

Is this achieveable?

 

Regards,

Abhay

  • Hi Anonymous ,

     

    We can try to create following measures as value field of line chart to meet your requirement:

     

    April Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "April" IN FILTERS ( 'Months'[Months] ),
            SUM ( '04 April 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '04 April 2019'[Frequency] )
    )

     

    May Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "May" IN FILTERS ( 'Months'[Months] ),
            SUM ( '05 May 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '05 May 2019'[Frequency] )
    )

     

    June Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "June" IN FILTERS ( 'Months'[Months] ),
            SUM ( '06 June 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '06 June 2019'[Frequency] )
    )

     

    July Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "July" IN FILTERS ( 'Months'[Months] ),
            SUM ( '07 July 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '07 July 2019'[Frequency] )
    )

     

    August Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "August" IN FILTERS ( 'Months'[Months] ),
            SUM ( '08 August 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '08 August 2019'[Frequency] )
    )

     

    September Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "September" IN FILTERS ( 'Months'[Months] ),
            SUM ( '09 September 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '09 September 2019'[Frequency] )
    )

     


    Best regards,

4 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    We can try to create following measures as value field of line chart to meet your requirement:

     

    April Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "April" IN FILTERS ( 'Months'[Months] ),
            SUM ( '04 April 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '04 April 2019'[Frequency] )
    )

     

    May Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "May" IN FILTERS ( 'Months'[Months] ),
            SUM ( '05 May 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '05 May 2019'[Frequency] )
    )

     

    June Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "June" IN FILTERS ( 'Months'[Months] ),
            SUM ( '06 June 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '06 June 2019'[Frequency] )
    )

     

    July Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "July" IN FILTERS ( 'Months'[Months] ),
            SUM ( '07 July 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '07 July 2019'[Frequency] )
    )

     

    August Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "August" IN FILTERS ( 'Months'[Months] ),
            SUM ( '08 August 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '08 August 2019'[Frequency] )
    )

     

    September Frequency Measure =
    IF (
        ISFILTERED ( 'Months'[Months] ),
        IF (
            "September" IN FILTERS ( 'Months'[Months] ),
            SUM ( '09 September 2019'[Frequency] ),
            BLANK ()
        ),
        SUM ( '09 September 2019'[Frequency] )
    )

     


    Best regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-lid-msftPerfect.

      Thanks a ton. Save my time a lot.

    • Anonymous's avatar
      Anonymous
      Not applicable

      VasTgThanks for your reply.

      However, I am still unable to get what I am looking for.

       

      Here is the screen shot that I get when I was trying to add a measure as suggested by you.

       

      Error adding measure

       

      Please refer to details of data content -

      - Data is separated by a JSON file for each month.

      - "Name" field is only common matching field across all the month's data set.

      - Note that there is no Date fields in any of dataset. I added a custom column as Month which has month name for all rows as I was trying to link it to slicer.

      - The graph has "Name" and "Frequency" fields only.

      - Table "Month" is a custom entered table that is added while referring to some of cummnity threads as a slicer. It has only 6 rows for month name with a index column as shown in slicer.

       

      My requirment is -

      - I want to click on Month name on the slicer, which should then display only that particular line in the chart. i.e. if i select April or August either one or all, then it should show only those lines for selected month.

      - Only 2 visuals, one for the chart and other the slicer.

       

      What I am unable to do is -

      - How to link the slicer to all other tables?

      - Where should be the measure field to be created?

       

      Let me know if this explains better.

       

      Regards,

      Abhay