Forum Discussion

Arvind_123's avatar
Arvind_123
Helper I
2 years ago
Solved

Cost Distribution %Row Total

Hi Team,

I have Device in row where month and types are in column.

the result I am getting in power bi is :

 but I need Month wise % row distribution in types that means I need addition of 2 click and 3 click would be 100%

for example find the ouput that I need which is easily available in excel

 

 

Thanks,

Arvind

  • hello @Arvind_123 

    assuming that the second level pn the columns is a column from a table with values :  2 click , 3 click.

    Can you please try this measure : 

    measure =
    var num = sum(table[col])
    var denom =
    calculate (
    sum( table[col]) ,
    allselected(table[click_col])

    return
    divide
    ( num,
    denom,
    0
    )

     

     

    let me know if it works .

     

    best regards.

4 Replies

  • Hi Team,

    Anyone can Please help me out to reach above desire output in power bi.

     

    Thanks,

    Arvind

    • Daniel29195's avatar
      Daniel29195
      Community Champion

      hello @Arvind_123 

      assuming that the second level pn the columns is a column from a table with values :  2 click , 3 click.

      Can you please try this measure : 

      measure =
      var num = sum(table[col])
      var denom =
      calculate (
      sum( table[col]) ,
      allselected(table[click_col])

      return
      divide
      ( num,
      denom,
      0
      )

       

       

      let me know if it works .

       

      best regards.