Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Percentage Calculation

Hi - I tried to search but could not find the exact answer for this simple one - this is a matrix report filtered just to show 2023 deals by lead source.   I'd like to add a coulmn that shows the %...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Create a new measure.

    count of id = 
    var _a=SELECTEDVALUE('Table'[LeadSource(groups)])
    var tmp=FILTER(ALL('Table'),[LeadSource(groups)]=_a)
    var _ctn=COUNTROWS(tmp)
    var _b=COUNTROWS(ALL('Table'))
    return IF(HASONEVALUE('Table'[LeadSource(groups)]),_ctn,_b)

    Best Regards,

    Neeko Tang

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