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
diogobraga2
Helper IV
Helper IV

Filter values shown in measure based on MAX year and date

The goal is to display data across 3 academic years (2018-2019, 2019-2020, 2020-2021), but limiting values from previous years to the most recent date (in this example 08/23/20) from the most recent academic year (2020-2021). The end result will look like the table below, except that the values after 08/23/20 (show in in the red box) should be blank.

LINK TO PBIX

 

2020-09-01_12-28-43.png

1 ACCEPTED SOLUTION

Hi @diogobraga2 ,

 

Would you please change your measure to:

 

 

Total Returning W = IF(WEEKDAY(MIN('Dates Adj'[Date]))=1 && MIN('Dates Adj'[Date])<=TODAY(), sum('result (5)'[Total Returning]),BLANK())

 

 

If it doesn't meet your requirement, would you please explain more about what you need?

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

It is difficult to understand what you are asking. are you wanting to limit the year to the current date, please give a better explanation. what do you want to do with this information and what is the issue exactly.  You can limit the date by doing a relative date function (see right of pic), what is the time frame you want to limit?  There are many ways to limit data.  Do you want to see the last 2 years data?   

 

Capture.PNG





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg thanks for the feedback. I updated the explanation, I hope it is clearer now! 

Hi @diogobraga2 ,

 

Would you please change your measure to:

 

 

Total Returning W = IF(WEEKDAY(MIN('Dates Adj'[Date]))=1 && MIN('Dates Adj'[Date])<=TODAY(), sum('result (5)'[Total Returning]),BLANK())

 

 

If it doesn't meet your requirement, would you please explain more about what you need?

 

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

 

Best Regards,

Dedmon Dai

you can do something like this in your measure

Total Returning W =
SWITCH (
TRUE (),
MAX ( 'Dates Adj'[Date] ) > TODAY (), 0,
WEEKDAY ( MIN ( 'Dates Adj'[Date] ) ) = 1, SUM ( 'result (5)'[Total Returning] )
)

this will put a 0 for ever day greater than today, or did you want blank?




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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!

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.