Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Plot residual value

Hi    I have a data source like this,  PN ID Date Val PN_1 User_1 wk_1 0.2 PN_1 User_1 wk_2 0.4 PN_1 User_1 wk_3 0.6 PN_1 User_2 wk_2 0.4 PN_1 User_2 wk_3 0.4 ...
  • d_gosbell's avatar
    7 years ago

    I think I would generate these "res" records using PowerQuery. 

     

    You can do this by

    • Right click on your existing query and choose Reference to create a new query that references the current one.
    • Then remove the PN column and group by date and id and sum the Val column
    • Create a new Val column that is 1 - Val
    • Then Add "Res" as a constant value for a new PN column
    • Then append the existing query to this new one
    • Finally right click on the original query and disable the load

     

    You can find a working example of the above steps in the attached pbix file