Forum Discussion
Dynamic Reference Line Trouble
- 8 years ago
Hi Anonymous,
Please create a measure using the formula below. You can add more choice in the SWITCH function, for example, ELA 5, ELA 6, ELA 7 and so on.line = IF ( ISFILTERED ( Table[ClassGrades] ), SWITCH ( SELECTEDVALUE ( Table[ClassGrades] ), "ELA 3", 58, "ELA 4", 61, 100 ), 0 )
Then add the measure in line chart field, you will get expected result.Best Regards,
Angelia
Hi Anonymous,
I create a a line and stacked column as follows.
As I tested, when you create a slicer to filter the a line and stacked column visual, when a value is selected in slicer, the line become a dot and there only one bar, what result do you want to get? Could you please share more details?
Best Regards,
Angelia
Hi v-huizhn-msft,
This is what my chart originially looks like:
For ELA 3 I want to add a line value of 58, so I added a measure to equal 58. When using the slicer to select ELA 3, I have this:
That's how I want the data to be displayed, so that's great. The problem is when I deselect ELA 3, and go back to viewing all grades at once, this is the visual:
The issue is that I only want that line value to be shown when I select Grade 3 in the slicer. I want each grade to have a different line measure, but for it to show only when that grade is selected in the slicer. For example, the line value for grade 4 is 61. So when I select grade 4, I want the line value to be 61, not 58. I want the line values dynamic in the sense that the lines will change when I change the grade selected in the slicer. Please let me know if this is possible and how I can set it up!
Thanks,
Lorraine
- v-huizhn-msft8 years agoMicrosoft Employee
Hi Anonymous,
Please create a measure using the formula below. You can add more choice in the SWITCH function, for example, ELA 5, ELA 6, ELA 7 and so on.line = IF ( ISFILTERED ( Table[ClassGrades] ), SWITCH ( SELECTEDVALUE ( Table[ClassGrades] ), "ELA 3", 58, "ELA 4", 61, 100 ), 0 )
Then add the measure in line chart field, you will get expected result.Best Regards,
Angelia