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

Previous Week values (not summarized)

 

Hi! Need a help with this case please. 
I'm trying to get previous week data in the last column, and actually i got it, but it shows the summ of all GECs, and i need to split it GEC by GEC.

Screenshot_2.jpg

test PrevWeek Bill HC = 
CALCULATE (
    SUM ( TTL_Employees[Billable] ),
        FILTER (
            ALL ( TTL_Employees ),
            TTL_Employees[WeekNo] = SELECTEDVALUE ( TTL_Employees[WeekNo] ) -1 &&
            YEAR ( TTL_Employees[Date] ) = SELECTEDVALUE ( TTL_Employees[Year] )
        )
)

Will be very appreciate for the help, because I stucked on this for few days so far. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

 

Use this DAX. Before using just shift your measure under another table 

Modeling  - Properties - Home Table  - select other table than TTL_employees

 

 

test PrevWeek Bill HC = 
CALCULATE (
    SUM ( Table1[Billable] ),
        FILTER (
            ALLEXCEPT( Table1,Table1[GEC] ),
            Table1[Week1] = SELECTEDVALUE ( Table1[Week1] ) -1 &&
            YEAR ( Table1[Date] ) = SELECTEDVALUE ( Table1[Year] )
        )
)


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

 

View solution in original post

11 REPLIES 11

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.