I have a table visual that should have totals of employees count for each BRANCH( as per REGION selection in slicer), company total.
Requirement: If the region of North is selected in the slicer then the table visual should display the values for branches in the north region.
Problem: I am unable to get the branch wise values in the table visual as per the slicer.
I tried creating a measure for a branch and added it to the visual but when another region is selected, there is no data.
Please see screenshot below for more details:
Measures I have used:
Company Total =
VAR _TotalAvg =
CALCULATE (
CALCULATE (
DISTINCTCOUNT ( EmployeeCount[EmployeeID]),
ALL (Branch[Region] ),
ALLSELECTED ( 'Date'[Year] )
)
)
RETURN
IF (
HASONEVALUE ( EmployeeCount[weeknum]),
_TotalAvg,
SUMX ( VALUES ( EmployeeCount[weeknum]), _TotalAvg )
)
This below one to show how the values should be showing the table visual for all branches in the selected region.
Manang = CALCULATE (
DISTINCTCOUNT ( EmployeeCount[EmployeeID]),
FILTER ( branch, branch[Branch] = "Manang" )
)
Can anyone please let me know how I can achieve this?
Here is a reduced .pbix file on one drive. https://1drv.ms/u/s!Ave_-9o8DQVEgQ0MjEg21sSb38lT?e=pakuIP
Thanks