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
UlrikL
Frequent Visitor

Count orders with ETA day 1 to16 next month

Hi

I have the measure below that counts the number of orders with ETA day 1 to 16 in the next month. This works fine most of the year but when we are in December an next mont is January (and therefor year 2021) it does not work.

 

How do I create a measure that are not affected på change in calender year ?

 

C5 - Orderbank 1-16 Next Mth =
CALCULATE(
    [1 - CC]
    ,DateType[DateType_Name] = "ETA Date"
    ,DATESBETWEEN(
        'Date'[Date]
        ,EOMONTH(TODAY(),0)+1
        ,DATE(
            YEAR(TODAY())
            ,MONTH(EOMONTH(TODAY(),0)+1)
            ,16
        )
    )
)
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

C5 - Orderbank 1-16 Next Mth =
CALCULATE(
    [1 - CC]
    ,DateType[DateType_Name] = "ETA Date"
    ,DATESINPERIOD(
        'Date'[Date]
        ,EOMONTH(TODAY(),0)+1
        ,16
        ,DAY
        )
    )
 

View solution in original post

2 REPLIES 2
UlrikL
Frequent Visitor

Thanx 😊

wdx223_Daniel
Super User
Super User

C5 - Orderbank 1-16 Next Mth =
CALCULATE(
    [1 - CC]
    ,DateType[DateType_Name] = "ETA Date"
    ,DATESINPERIOD(
        'Date'[Date]
        ,EOMONTH(TODAY(),0)+1
        ,16
        ,DAY
        )
    )
 

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