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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to write dax query about last 2 weeks employee completed tasks in project?

Dax query : last 2 weeks emp cmmpleted work in project
1 ACCEPTED SOLUTION

Hi kunuthuri,

 

Create a measure using DAX as below:

Less than 2 weeks =
CALCULATE (
    MAX ( Table1[Title] ),
    FILTER ( Table1, Table1[Date] <= TODAY () - 1 && Table1[Date] >= TODAY () - 15 )
)

捕获.PNG 

 

Regards,

Jimmy Tao

View solution in original post

8 REPLIES 8
v-yuta-msft
Community Support
Community Support

Hi kunuthuri ,

 

As a general solution, you can create a measure using dax like this pattern:

 

Result =
VAR Last_Two_Week =
    MAX ( Table[Date] ) - 14
RETURN
    CALCULATE (
        aggregation,
        FILTER (
            Table,
            Table[Date] > Last_Two_Week
                && Table[Date] <= MAX ( Table[Date] )
        )
    )

Regards,

Jimmy Tao

 

Anonymous
Not applicable

Hi

Thanks to reply,

 

How to display values from 'Title' Column whose completed date in last 2 weeks?

Capture4.PNG

Hi kunuthuri,

 

Create a measure using DAX as below:

Less than 2 weeks =
CALCULATE (
    MAX ( Table1[Title] ),
    FILTER ( Table1, Table1[Date] <= TODAY () - 1 && Table1[Date] >= TODAY () - 15 )
)

捕获.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Thanks Jimmy Tao

 

Its working fine

Anonymous
Not applicable

Hi

 

From todays date to next 14 days new task and active data display like below examples

 

column = IF(Table1[column]="New" && table1[column]<=today+14, table1[column])

 

above calculated column is correct to retrieve data next 14 days data?

 

Thanks

Kunuthuri

 

in some other post i think they solved this for you in the comments, why not check them?

Also, why not write all in just one post?

this is a spamming helping

This seems awfully similar to the previous five or six threads you've started, but you've not actually given any clear idea of what you're doing in any of them

Anonymous
Not applicable

Every day display data based on todays date, means if we see data today, today to last 2 weeks and tomorrow we see data tomorrow onwards 2 weeks need to display

 

Can you please assist?

 

Thanks

Kunuthuri

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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