Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter into formula

Hi, could anyone help me with this problem..   I need to write formula witch takes filter value and used it in a formula. For example: Filter of works:  1. Work A 2. Work B   My formula should...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Nathaniel_C,

    Thanks for your help, but this didn't work for me, because in "myTable[column]" I have wrong data from accounting program. That's why if I choose A or B work I need to split all costs by proportion of 0,7 and 0,3.

     

    I add my solution:

     

    work costs = if(SELECTEDVALUE('2019 details'[Work])="work A";CALCULATE(SUM('2019 details'[SUM])*0,7;all('2019 details [work]); if(SELECTEDVALUE('2019 details'[Work])="work B";CALCULATE(sum('2019 details'[SUM])*0,3;all('2019 details '[Work]); CALCULATE(sum('2019 details'[SUM]);all('2019 details '[Work])