Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Line diagram with multiple lines

Hi all,    The image you see below shows a slicer (left) and a visual I have created with this slicer. The line diagram visual to the right is how I would like to see my visual, so that's great. Th...
  • jgeddes's avatar
    3 years ago

    You may be able to get the desired result by using the concatenated Variabelen as the legend. 
    The problem then becomes all the data is loaded into the visual when there is no selection from any of the slicers.

    You can get around this by amending your measure to test for filtering from any of the slicers and return a blank if no filtering is selected. 

    Example:

     

    Punten Sum =
    var _sum =
    SUM('Table (2)'[Punten])
    var _result =
    SWITCH(
        TRUE(),
        ISFILTERED('Table (2)'[Stad]), _sum,
        ISFILTERED('Table (2)'[Waarde]), _sum,
        ISFILTERED('Table (2)'[Label]), _sum,
        BLANK()
    )
    Return
    _result
     
    Now with a blank visual the user may need some prompting, so you can create a conditional title that tells the user to select a slicer to be able to see data.
     
    I created a very small sample set to illustrate.
     

    The conditional title measure I used was

     

    Title Text =
    var _blank =
    "Please select slicer to view data"
    var _title =
    "ACTUAL CHART TITLE"
    var _testStad =
    IF(ISFILTERED('Table (2)'[Stad]),1,0)
    var _testWaarde =
    IF(ISFILTERED('Table (2)'[Waarde]),1,0)
    var _testLabel =
    IF(ISFILTERED('Table (2)'[Label]),1,0)
    Return
    IF(_testLabel+_testStad+_testWaarde>0,_title,_blank)
     
    This is not a crisp solution, but it should get you going in the right direction.
  • jgeddes's avatar
    jgeddes
    3 years ago

    For the visual I have:

    1st Measure

    2nd Measure

    The title measure is then put in the conditional formatting cell of the visual