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

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
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.