Forum Discussion
Visualization to show cross projects
Hello PowerBI masters,
I would like to ask you how to solve problem which I found in my task.
I need to create a chart that shows the project and the teams that are working on a specific project.
But I have to show only projects where is more than one team.
I have 3 main tables which I'm using to achieve some results.
Employees
Projects
EmployeeBooking where I have estimated hours for specific project.
This is my pbix file with some visualization.
TestCrossTeams.pbix - Google Drive
I'm trying to achive stacked chart which be focusing only on Projects with multiple teams.
But the problem is than I don't know how to filter out Project with single team.
My measure to count Teams:
Sorry for creating another account and the same topic. But I am having trouble logging into my old microsoft account.
If anyone could help with those problem I will be very greateful 🙏
Have a nice day!
Konrad
- Anonymous2 years ago
Hi Konrad9090
You can refer to the following measure
Measure = VAR a = SUMMARIZE ( ADDCOLUMNS ( ALLSELECTED ( EmployeeBookings ), "Projects", RELATED ( Projects[Name] ), "Team", RELATED ( Employees[Team] ) ), [ID Project], [Projects], [Team] ) VAR b = COUNTROWS ( FILTER ( a, [Projects] IN VALUES ( Projects[Name] ) ) ) RETURN IF ( b > 1, COUNTROWS ( FILTER ( a, [Projects] IN VALUES ( Projects[Name] ) && [Team] IN VALUES ( Employees[Team] ) ) ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi Konrad9090
You can refer to the following measure
Measure = VAR a = SUMMARIZE ( ADDCOLUMNS ( ALLSELECTED ( EmployeeBookings ), "Projects", RELATED ( Projects[Name] ), "Team", RELATED ( Employees[Team] ) ), [ID Project], [Projects], [Team] ) VAR b = COUNTROWS ( FILTER ( a, [Projects] IN VALUES ( Projects[Name] ) ) ) RETURN IF ( b > 1, COUNTROWS ( FILTER ( a, [Projects] IN VALUES ( Projects[Name] ) && [Team] IN VALUES ( Employees[Team] ) ) ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Konrad9090Regular Visitor
It works. Thank you for the quick reply 🙂
- Konrad9090Regular Visitor
Hi again,
I'll continue posting my another problem here as it is related to the same case and report.
I've added another table to my model called 'Teams'. I need to be able to filter my visualization by team or teams and by one resource or resources.
Filtering by teams I achieved, but I have problem how to implement in DAX measure option to filter by resource or resources.
All my idea end up with blank visualization when I select some name of resource from slicer.
I've uplouded my latest version of the report I anyone has idea how to resolve those problem I'll by very greatefull.
Maybe you Anonymous will be able to help.
Link to my report.
https://drive.google.com/file/d/1ADN9aA2OkMXbinx1nukzlQdFhZ0ya0eO/view?usp=sharing