Forum Discussion

unnijoy's avatar
unnijoy
Post Prodigy
4 years ago
Solved

Grand total Percentage dynamically

Hi All, I need to calculate the percentage of Total. If no filter is applied it should calculate based on grand total. If i apply any filter say country, manager name then it should take the total b...
  • v-zhangti's avatar
    4 years ago

    Hi, unnijoy 

     

    Please check the following methods.

    Measure = 
    Var _name=SELECTEDVALUE('Table'[Leader name])
    Var _CountEmpid=CALCULATE(COUNT('Table'[Empid]), FILTER(ALL('Table'),MONTH('Table'[Month])=1))
    Var _Countname=CALCULATE(COUNT('Table'[Leader name]),FILTER(ALL('Table'),MONTH('Table'[Month])=1&&[Leader name]=_name))
    Return
    IF(_name=BLANK(),_CountEmpid,DIVIDE(_Countname,_CountEmpid))

    If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.