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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

I want to see the values before the date selected in the slicer

I have a measure that brings the maximum date for that particular row. Let's say sold date. One item could be sold many times because it's returned or any other reason.

 

I want to see the records when I select a date (single selection), that date and previous dates should be included in my matrix kpi 

 

please ask me if you have any questions 
thanks

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Approve with @amitchandak .

Here is my sample:

vjianbolimsft_1-1674627525913.png

Please try:

First create a date table for slicer:

vjianbolimsft_0-1674627330374.png

Note: The Date table do not have relationship with your fact table.

Then apply the measure to your visual's filter:

Measure = IF(MAX('Table'[Date])<=MAX('Date'[Date]),1,0)

vjianbolimsft_2-1674627599452.png

Final output:

vjianbolimsft_3-1674627639187.png

Best Regards,

Jianbo Li

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak thank you.

v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Approve with @amitchandak .

Here is my sample:

vjianbolimsft_1-1674627525913.png

Please try:

First create a date table for slicer:

vjianbolimsft_0-1674627330374.png

Note: The Date table do not have relationship with your fact table.

Then apply the measure to your visual's filter:

Measure = IF(MAX('Table'[Date])<=MAX('Date'[Date]),1,0)

vjianbolimsft_2-1674627599452.png

Final output:

vjianbolimsft_3-1674627639187.png

Best Regards,

Jianbo Li

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

Anonymous
Not applicable

Hello there,

I would appreciate it if you shared pbix file so I can see how it's working

thanks

amitchandak
Super User
Super User

@Anonymous , If you only need value

 

You can create a measure like

measure  = calculate(Sum(Table[Value]), filter(all(Date), Date[Date]) < Max(Date[Date]) ))

 

or

 


new measure =
var _max = maxx(allselected(Date),Date[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

But you need show date on axis ,then you need slicer on independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.