Forum Discussion

Eyal's avatar
Eyal
Icon for Helper II rankHelper II
5 years ago
Solved

Calculate tests per date per item

Hi   I am strugeling with the following, I have two tables.  Table A - a claculated table (so cant use power query) - get the number of item produced in each step by date Table B- is a key table...
  • Eyal's avatar
    5 years ago

    Dear all 

     

    I was able to find a solution.

    hope it helps someone 

     

    step 1 :

    creat a new table based on summerization  of the Table A mentioned above

    Plan =
    SUMMARIZE(
    FILTER('TableA',NOT('TableA'[Activity] IN { "Not relevent item 1", "N/R", ......})),
    'Calendar'[Year#],
    'Calendar'[Month#],
    'Calendar'[MonthName],
    'TableA'[project],
    'TableA'[Activity],
    'TableA'[BR Scale],
    "Items",sum('TableA'[Run])
    )

     

    Step 2 make a relationship between new table and table B based on the "Step"

     

    for each test a calculated column

    # of test = 

    var test = LOOKUPVALUE(TableB[Test1],TableB[Step],'plan'[Step])
    return
    ('Plan'[Items]*test)