Forum Discussion

JoseGo's avatar
JoseGo
Frequent Visitor
8 years ago
Solved

User select Filter in Calculate

Hello everyone,   I have been trying to create a table where it shows different cities and a company's market share in each city. This is an example of the database I am working with:     ...
  • Stachu's avatar
    8 years ago

    does something like this solve the issue?

    Company Share = 
    VAR SalesCompany = SUM('Table'[Sales])
    VAR SalesAllCompanies = CALCULATE(SUM('Table'[Sales]),ALL('Table'[Company]))
    RETURN
    DIVIDE(SalesCompany,SalesAllCompanies)

    you can filter the companies with slicer this way