Forum Discussion

Padagon's avatar
Padagon
Frequent Visitor
2 years ago
Solved

Visualize Current and Previous Week in cards

This might have been solved, I have tried some solutions however I haven't achieved what I need.   So the situation is this, I have a table like this:   id article evaluation_results date ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Padagon ,

    Based on my testing, please try the following methods:

    1.Create the sample table.

    2.Create the measure to calculate the previous week.

    Previous week = 
    CALCULATE(
        SUM('Table'[evaluation_results]),
        FILTER(
            'Table',
            'Table'[date] >= MIN('Table'[date]) && 'Table'[date] <= MIN('Table'[date]) + 6
        )
    )

    3.Create the measure to calculate the current week.

    Current week = 
    CALCULATE(
        SUM('Table'[evaluation_results]),
        FILTER(
            'Table',
            'Table'[date] > MIN('Table'[date]) + 6 && 'Table'[date] <= TODAY()
        )
    )

    4.Drag the measures into the card visual.

    5.Drag the article into the card visual. The result is shown below.

     

    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.