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
Anonymous
Not applicable

Get values outside range of date slicer

Hi,

 

I am having an issue with my measure calculating a value that includes info from a previois week.

 

I have a date slicer filtered on Week Ending whereby:

 

Monday - first day of the week

Sunday - last day of the week

 

I have the following measures:

 

LicenseCountPreviousDay = CALCULATE([LicenseCountPerDay], PREVIOUSDAY('Date'[Date]))
LicenseCountPerDay = 
SUM('SubscriptionAnalyticsMerge'[SubscriptionAnalyticsDetail.licensecount])
Users Added= [LicenseCountPerDay] - [LicenseCountPreviousDay]

All is good until I need to get values for LicenseCountPreviousDay on the first day of the week.

This value always is blank as it filetered out by the date slicer.

 

date_slicer_issue.png

I need some ideas on the best way to get the previous value.

 

Thanks

 

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

Hi @Anonymous ,

I'd like to suggest you manually define date filter condition, time intelligence functions not suitable to deal with this scenario.

 

LicenseCountPreviousDay =
VAR currDate =
    MAX ( Date[Date] )
RETURN
    CALCULATE (
        [LicenseCountPerDay],
        FILTER ( ALL ( Table ), [Date] = currDate - 1 )
    )

 

Regards,

Xiaoxin Sheng

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

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

I'd like to suggest you manually define date filter condition, time intelligence functions not suitable to deal with this scenario.

 

LicenseCountPreviousDay =
VAR currDate =
    MAX ( Date[Date] )
RETURN
    CALCULATE (
        [LicenseCountPerDay],
        FILTER ( ALL ( Table ), [Date] = currDate - 1 )
    )

 

Regards,

Xiaoxin Sheng

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

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.

Top Solution Authors