Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
kmartink
Frequent Visitor

A card displaying the last data after those being filtered by a slicer

Hi everyone,

I have a stacked column chart which shows on the x-axis the week numbers and on the y-axis my data. I have built a "greater than or equal to" slicer which is filtering the weeks so the user can see only the data per weeks they are interested in.

 

Now I want to make a card which will show only the last week's data - however, by the last week I mean the last week currently shown in the stacked column chart = the last week currently filtered with the slicer. Is it possible and how could I make this? Thank you.

1 ACCEPTED SOLUTION
Adamboer
Responsive Resident
Responsive Resident

Yes, it is possible to create a card that shows only the last week's data based on the slicer selection.

You can achieve this by using a measure that calculates the last week's data based on the slicer selection. Here is an example DAX measure that you can use:

Last Week's Data =
VAR MaxWeek = MAX('Table'[Week])
RETURN
CALCULATE(SUM('Table'[Data]), 'Table'[Week] = MaxWeek)

In this measure, replace 'Table' with the name of your data table, 'Week' with the name of the week column in your data, and 'Data' with the name of the data column in your data.

Once you have created this measure, add a card visual to your report canvas and add this measure to the Values field. The card will now show the last week's data based on the slicer selection.

Note that the measure may need to be modified based on the specific data model and slicer configuration of your report.





View solution in original post

1 REPLY 1
Adamboer
Responsive Resident
Responsive Resident

Yes, it is possible to create a card that shows only the last week's data based on the slicer selection.

You can achieve this by using a measure that calculates the last week's data based on the slicer selection. Here is an example DAX measure that you can use:

Last Week's Data =
VAR MaxWeek = MAX('Table'[Week])
RETURN
CALCULATE(SUM('Table'[Data]), 'Table'[Week] = MaxWeek)

In this measure, replace 'Table' with the name of your data table, 'Week' with the name of the week column in your data, and 'Data' with the name of the data column in your data.

Once you have created this measure, add a card visual to your report canvas and add this measure to the Values field. The card will now show the last week's data based on the slicer selection.

Note that the measure may need to be modified based on the specific data model and slicer configuration of your report.





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.