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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
fellipea_ao
Helper I
Helper I

How to filter a page by last date and keep measures working?

Hello!
I have a dashboard that monitors the number of stocks per person per day. In one of the tabs, I illustrate the current day's data and compare it to the last working day. In another case I do the same analysis, but looking at 7 days.

There are two databases, one that informs the number of stocks per person per day and another that illustrates the closing price of the stock and the day. They are linked by date.

 

I created some measures to make comparisons between the current day and the previous day and seven days ago. Furthermore, I need both tabs to always be filtered by the last date found in the database.So, I cratead a calculated column that show last day, but when I use a slicer or use that column as filter page, the measures stop to work.
How can I solve this problem?

E.g: Here I'm using the normal filter, and filtered the last date 21/06/20204. Everything is working.

fellipea_ao_1-1720874607031.png

E.g: Here i used the "last day" in filter, using the calculated column that I have created.

fellipea_ao_2-1720874638031.png

Calculated column:

 

DataDescription = 
VAR _MaxDate = MAX(Amount[Date])
RETURN
IF(_MaxDate = Amount[Date], "Last Date", "Historical Date")

 

Measures that stoped to work (D-1 and D-7):

#Amount D-1
#Variation Amount D-1
%Variation Amount D-1
$Price D-1
%VariationPrice D-1


Here the link for pbix and database. 




1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Very confusd about what you want.  See my solution in the attached file.

 

 Ashish_Mathur_0-1720916740674.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Very confusd about what you want.  See my solution in the attached file.

 

 Ashish_Mathur_0-1720916740674.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello, @Ashish_Mathur . Thank you for reply, it's worked for me. I was trying to create a filter to use last date as start, but your solution is more refined.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.