Forum Discussion

SUMESHKUMAR22's avatar
SUMESHKUMAR22
Helper IV
1 year ago
Solved

Create Small Multiple Line chart without legends

Hi Team, 

Purpose: To reduce the number of visuals on the page.
Looking for as solution to implement  small multiples (line chart) but without any legends in use, just using KPI's as the legends.
In below screenshot, I want to club all these selected line charts Metrics into 1 line chart using small multiples feature.


FYI, the scaler numbers is shown using New card visual.


Please help with any workarounds reference/ sample solution file.

Regards,
Sumesh

  • Hi SUMESHKUMAR22 
    If you want to stay with the new cards you can use a svg sparklines to achieve something similar.
    Please refer to the linked video ( from 12 minute ) :
    https://www.youtube.com/watch?v=oHAeKf04ne8

    If you want a small multiple you can instead of using dynamic measure and text boxes like :

    To achieve it, you can create a disconnected table like :

     

    Sort the measures by needed order :

    Create standard needed measures :

    Total Sales = DIVIDE(SUM(Sales[Sales]),1000)
    Total profits = Divide (sum('Sales'[Profits]),1000)
    profits% = DIVIDE([Total profits],[Total Sales])*100

    Create a dynamic measure :

    Dynamic measure = SWITCH(SELECTEDVALUE('Table'[Measure]),
    "Sales",[Total Sales],
    "Profits",[Total profits],
    [profits%])
    This dynamic measure will be on the Y axis for small multiples :

    The next step is creating the titles for every section:

    Title for Sales =
    "Sales K/$ :" & [Total Sales]
    Title for profits =
    "Profits K/$ :" & [Total profits]
    Title for profits % =
    "Profits % :" & FORMAT( [profits%]/100,"0.0%")
     Now you can take these titles to text boxes and put them on the graph

    Result (ignore the blue lines they will not be shown after publishing)

    You can also group all the elements together:

    The pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

     

  • Ritaf1983's avatar
    Ritaf1983
    1 year ago

    Hi SUMESHKUMAR22 
    To mark the last point and that label on a small multiple you can apply these steps:

    1. Create a Dax measure for the color, which will be with the color you need if we are on the last point, and white transparent if we are not :

    last point color = if (SELECTEDVALUE('Calendar'[Month])<>calculate(max('Calendar'[Month]),ALLSELECTED('Calendar'[Month])),"#FFFFFF00","Blue")
    2. Change the graph type to the clustered / stacked columns :

    3. Modify conditional formatting for column color based on the measure that we created:

    Now change the graph back to line:

    6. Do the same conditional formatting trick with the data labels, based on the same measure :

    Result :

    The updated pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

3 Replies

  • Hi SUMESHKUMAR22 
    If you want to stay with the new cards you can use a svg sparklines to achieve something similar.
    Please refer to the linked video ( from 12 minute ) :
    https://www.youtube.com/watch?v=oHAeKf04ne8

    If you want a small multiple you can instead of using dynamic measure and text boxes like :

    To achieve it, you can create a disconnected table like :

     

    Sort the measures by needed order :

    Create standard needed measures :

    Total Sales = DIVIDE(SUM(Sales[Sales]),1000)
    Total profits = Divide (sum('Sales'[Profits]),1000)
    profits% = DIVIDE([Total profits],[Total Sales])*100

    Create a dynamic measure :

    Dynamic measure = SWITCH(SELECTEDVALUE('Table'[Measure]),
    "Sales",[Total Sales],
    "Profits",[Total profits],
    [profits%])
    This dynamic measure will be on the Y axis for small multiples :

    The next step is creating the titles for every section:

    Title for Sales =
    "Sales K/$ :" & [Total Sales]
    Title for profits =
    "Profits K/$ :" & [Total profits]
    Title for profits % =
    "Profits % :" & FORMAT( [profits%]/100,"0.0%")
     Now you can take these titles to text boxes and put them on the graph

    Result (ignore the blue lines they will not be shown after publishing)

    You can also group all the elements together:

    The pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

     

    • Ritaf1983's avatar
      Ritaf1983
      Super User

      Hi SUMESHKUMAR22 
      To mark the last point and that label on a small multiple you can apply these steps:

      1. Create a Dax measure for the color, which will be with the color you need if we are on the last point, and white transparent if we are not :

      last point color = if (SELECTEDVALUE('Calendar'[Month])<>calculate(max('Calendar'[Month]),ALLSELECTED('Calendar'[Month])),"#FFFFFF00","Blue")
      2. Change the graph type to the clustered / stacked columns :

      3. Modify conditional formatting for column color based on the measure that we created:

      Now change the graph back to line:

      6. Do the same conditional formatting trick with the data labels, based on the same measure :

      Result :

      The updated pbix is attached

      If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

  • Ritaf1983 , thanks for the detailed solution 🙂
    How  we can display the maxdate datapoint & display value label for that on the line viz?

    Thanks,