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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Date in Range for specific criteria

I've a data for pay period (Bi weekly every Satuday) and the amount.
I would like to get the latest pay period in the Bar chart (with prior) on bi weekly basis (every Thursday)
For an example, let's say our next pay period is on 25/02/2023 (Saturday) but this data will come from payroll on Thursday 02/03/2023 and Thursday we have a pipeline which process the data and push it to SQL on 02/03/2023 and on the same day my report will refresh and I want to see all the pay period and amount on 02/03/2023.
Note that untill 02/03/2023 I don't want to see 25/02/2023 pay period data.

mbagwan_0-1676384033119.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Date = CALENDAR(DATE(2023,1,1),DATE(2023,3,31))

Measure:

Next Thursday = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Date'),[Weekday]=4&&[Weeknum]=MAX('Date'[Weeknum])+1))

vzhangti_0-1676528918071.png

Date Slicer = CALENDAR(DATE(2023,1,1),DATE(2023,3,31))
Measure =
IF ( SELECTEDVALUE ( 'Date Slicer'[Date] ) >= [Next Thursday]
        && SELECTEDVALUE ( 'Date Slicer'[Date] ) >= SELECTEDVALUE ( 'Table'[Pay Period] ),
    1,
    0
)

Result:

vzhangti_1-1676529052290.png

 

vzhangti_2-1676529083300.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Date = CALENDAR(DATE(2023,1,1),DATE(2023,3,31))

Measure:

Next Thursday = CALCULATE(MAX('Date'[Date]),FILTER(ALL('Date'),[Weekday]=4&&[Weeknum]=MAX('Date'[Weeknum])+1))

vzhangti_0-1676528918071.png

Date Slicer = CALENDAR(DATE(2023,1,1),DATE(2023,3,31))
Measure =
IF ( SELECTEDVALUE ( 'Date Slicer'[Date] ) >= [Next Thursday]
        && SELECTEDVALUE ( 'Date Slicer'[Date] ) >= SELECTEDVALUE ( 'Table'[Pay Period] ),
    1,
    0
)

Result:

vzhangti_1-1676529052290.png

 

vzhangti_2-1676529083300.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors