Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

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?

Slicer.jpg

 

Regards,

Abhay

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community 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,

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

View solution in original post

4 REPLIES 4
v-lid-msft
Community Support
Community 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,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lid-msftPerfect.

Thanks a ton. Save my time a lot.

VasTg
Memorable Member
Memorable Member

@Anonymous 

 

You need to do something similar to this post. If use april measure(or calculation) for april, june measure(or calculation) for June and so on.

 

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

 

 

If this help, mark it as a solution

Kudos are good too

Connect on LinkedIn
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 measureError 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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.