Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a clustered bar chart displaying a value for each category, category in this case is manager.
I have a slicer on manager dimension.
I only want data to display in the chart if one manager is selected in the slicer. Ive tried hasonefilter & hasonevalue but it does not work.
% Holidays taken = if(HASONEFILTER(manager[MangerName]), SUMX(EmployeeHolidays, EmployeeHolidays[HolidaysTaken]) /SUMX(EmployeeHolidays,EmployeeHolidays[Holidays allowed]),blank())
Even if two managers are selected & hasOneFilter is FALSE, the chart still shows a column for each manager.
Is it possible to limit the chart to just one column and show nothing if multiple managers are selected?
Below link is a working example, demonstrating the issue.
Thanks for any expertise provided.
https://1drv.ms/u/s!AgldA0VQfPV9hNA0nmyWWnaHDd8sVw
Solved! Go to Solution.
try adding this calculated column in your "Employee Holidays" table
then use this in your chart instead of managerName from manager table
ManagerName = RELATED(manager[MangerName])
try adding this calculated column in your "Employee Holidays" table
then use this in your chart instead of managerName from manager table
ManagerName = RELATED(manager[MangerName])
File attached as well
Basically the formula is evaluated individually for each Axis/Row field
So for individual bar of the chart, the hasonefilter condition is TRUE although collectively it might not be TRUE
Thats why we could replace the Axiscolumn in the chart from ManagersTable[ManagerName] to EmployeeHolidays[ManagerName] and get the desired results
Hi.
Thanks for the response.
That works well, thanks for the help!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |