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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
astano05
Helper III
Helper III

Date Filtering - Use Max Date even if blank

I have a date slicer. I want to use the last date in the range in a measure. Right now using Max or LastDate will take the last non-blank. 

 

For example, with order data i want a measure for the quantity ordered on the last date of the date range. 

Slicer = 1/1/2021-8/4/2021

If a customer had no orders on 8/4 it will take the next non-blank date and use that for the measure. I want it to use 8/4 no matter what. 

 

How can I accomplish this?

1 ACCEPTED SOLUTION

@astano05 

maybe you can try create a date table, create relationship with your table. Use the date from date table in the slicer. Then you can get maxdate = max(date[date])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@astano05 

do you have a date table? could you pls provide the sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




i do not have a date table in this set.

 

I have a table with order headers (order level) connected to a table with order line information (item level), as well as tables with customer information and item information. 

 

HI @astano05,

Please provide some dummy data to help us clarify your table sculpture and relationship, then we can test to coding formula on it.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@astano05 

maybe you can try create a date table, create relationship with your table. Use the date from date table in the slicer. Then you can get maxdate = max(date[date])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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