Hi All,
My data looks like below :
I want to be able to do the following , if i select any store, I should be able to see the total of the area manager irrespective of the store selected.
Appreciate any help.
Thanks
Grace
Hi All,
My data looks like below :
I want to be able to do the following , if i select any store, I should be able to see the total of the area manager irrespective of the store selected.
Appreciate any help.
Thanks
Grace
Assuming you have a one to many relationship from Stores to Sales, using Store No column from the stores table you can write the following:
Total Sales = SUM( Sales[Amount] )
Total Sales of Manager = CALCULATE( [Total Sales], ALL ( Stores[Store No]), VALUES( Stores[Area Manager]) )
Nick,
Thanks Nick. This is great. I worked out a solution and it worked but isn’t as elegant as yours.
Total Sales of Manager =
VAR AMSelected =
CALCULATE (
MAX ( stores[Area Manager] ),
CALCULATETABLE (
VALUES ( stores[Area Manager] ),
ALLSELECTED ( stores[Store Name] )
)
)
RETURN
CALCULATE (
[Total Sales],
FILTER (
CALCULATETABLE ( stores, ALL ( stores ) ),
stores[Area Manager] = AMSelected
)
)