Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
Solved! Go to Solution.
Hi @AbhayB ,
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,
Hi @AbhayB ,
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,
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.
If this help, mark it as a solution
Kudos are good too
@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
User | Count |
---|---|
123 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
183 | |
90 | |
67 | |
62 | |
53 |