Forum Discussion

jcarlos's avatar
jcarlos
Helper I
4 years ago
Solved

Showing only Last Week progress

Hi! I am using Power BI to show a project status. The data comes from Primavera P6.   One of the important measures is related to the %Plan vs %Actual for last week/month.   I have created this ...
  • jcarlos's avatar
    jcarlos
    4 years ago

    Thanks v-chenwuz-msft .

     

    The relationship between my tables is like you are suggesting.

     

    I've solved the issue by doing this:

     

    %Actual_Last_Week =
    VAR var_MAX_Date = calculate(MAX('NLU Distribution - ACTUAL'[Week_Rank]),ALL())
    RETURN
    CALCULATE(PROJECT[%Actual_by_Category],'Project Calendar'[Week_Rank]=var_MAX_Date,all('Project Calendar'[Week_Rank]))
     
    Basically...declaring a VAR to define the MAX Date...removing ALL the filters to ensure MaxWeek it's the same for every category.
     
    Many thanks for your support,