Forum Discussion

zuro16's avatar
zuro16
Helper I
3 years ago
Solved

Counting Line Items from a created Measure

Hello, I have built a table that shows values per company code ( country legal entities) along with a calculation for percentages based on those values presented. I’d like to ask if there is a way ( ...
  • vanessafvg's avatar
    3 years ago

    can you provide some sample data in text format?

     

    it could probably be something like this

     

    Count per Company =
    VAR vrcompany =
    SELECTEDVALUE ( 'table'[company] )
    VAR result =
    CALCULATE ( COUNTROWS ( table ), 'table'[company] = vrcompany )
    RETURN
    result