Forum Discussion
Table Visual as per Slicer Selection
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 in the report
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 )
)Manang = CALCULATE (
DISTINCTCOUNT ( EmployeeCount[EmployeeID]),
FILTER ( branch, branch[Branch] = "Manang" )
)
Can anyone please let me know how I can achieve this?
Thanks
5 Replies
- v-xicaiCommunity Support
Hi db1Intermtn ,
You may create measure like DAX below.
Manang = CALCULATE ( DISTINCTCOUNT ( EmployeeCount[EmployeeID]), FILTER (ALLSELECTED( branch), branch[Region] = MAX(branch[Region] )))
Or could you please share your sample data for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- db1IntermtnHelper I
Hey Amy,
Here is the link to onedrive for the .pbix. Could you please have a look at it?
https://1drv.ms/u/s!Ave_-9o8DQVEgQmlPKD6E0aG6s1i?e=gf1OcO
Thanks
- db1IntermtnHelper I
v-xicai Can you please check my .pbix and let me know you can help me with the issue?
Thanks.