Forum Discussion

jonathanmathes's avatar
jonathanmathes
Regular Visitor
4 years ago
Solved

Column total as average

I have a table with two columns of data: Absenteeism and Turnover. In the total of the Absenteeism column, the BI is bringing the average of the months. Already in the total of the Turnover column h...
  • amitchandak's avatar
    4 years ago

    jonathanmathes , You can switch total to avg or sum depending on need using isinscope

     

    if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , sumx(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])

     

    or

     

     

    if(isinscope(Table[Year]) && Not(Isinscope(Table[Month])) , AverageX(summarize(Table, Table[Year], Table[Month], "_1", [measure]), [_1]), [Measure])