Forum Discussion

Bc0303's avatar
Bc0303
Frequent Visitor
2 years ago
Solved

Sparkline and Current Year Question in Matrix

Hi,

 

Couple of questions in this thought id group them together as they are for the same matrix table, first of all is there a way I can ignore my Year filters on a sparkline ive created? as the Matrix table has the ability to show figures for each year using a filter but if you select a singular year the sparkline shows as a dot rather than a line graph?

 

Second one - is there a way to create a measure for example Sum of Cost for current year from todays date so it will only show in the measure the sum of cost for the year from today(), so next year it will only show next years data and this is uneffected by filters selected.

 

Hope that makes sense, thanks!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Bc0303 ,

    Based on my testing, please try the following methods:

    1.Create the simple table.

    2.Drag the field into the matrix visual and add a sparkline on the values.

    3.The sparkline is shown in matrix visual.

    4.Select Edit interactions in the format pane.

    5.Click the none button.

    6.Select the year filter in slicer, the result is shown below.

    For the second question:

    Create the measure to calculate the cost from today date for current year.

    YTD = CALCULATE (
            SUM ('Table'[Values]),
            FILTER (
                ALL ('Table'),
                'Table'[Year] = YEAR(TODAY()) && 'Table'[Month] >= MONTH(TODAY())
            )
        )

    Drag the measure into the card visual.

     

    Best Regards,

    Wisdom Wu

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Bc0303 ,

    Based on my testing, please try the following methods:

    1.Create the simple table.

    2.Drag the field into the matrix visual and add a sparkline on the values.

    3.The sparkline is shown in matrix visual.

    4.Select Edit interactions in the format pane.

    5.Click the none button.

    6.Select the year filter in slicer, the result is shown below.

    For the second question:

    Create the measure to calculate the cost from today date for current year.

    YTD = CALCULATE (
            SUM ('Table'[Values]),
            FILTER (
                ALL ('Table'),
                'Table'[Year] = YEAR(TODAY()) && 'Table'[Month] >= MONTH(TODAY())
            )
        )

    Drag the measure into the card visual.

     

    Best Regards,

    Wisdom Wu

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