Forum Discussion
Multiple conditions for a dashboard chart.
I have a dataset with multiple clubs playing a game, all these clubs have multiple teams under it classified based on the age groups(under 8 U8 - U16 age groups).
Now i have to build a dashboard to highlight the clubs which have certain mandatory teams under it, among the list of clubs and teams, the dashboard will have to check if the clubs have mandatory teams as per the age group from the rules, highlight them in a color background and then show if this club meets all the rules.
If they are not meeting the rules, then it can stay unchanged.
Columns are - Clubs, Teams, Team age group, Team gender.
Rules/Mandatory teams required are:
1. A club must have U8 or girls team and U14.
2. A club must have U9 or girls team and U15.
3. There must be a max of 2 years age gap between teams in a club.
4. A club must have minimum of 4 teams between the age group U8 to U16.
Currently I am using the matrix chart for this dashboard, Clubs, Teams and Team age group are in rows, also i am using a clustered bar chart to display the count of teams
under different age group i.e., X-axis = count of team, Y-axis = Age groups.
My approach 1 - is it possible to achieve this by using table chart? by displaying all clubs, teams and their respective age groups in rows and highlight the teams as per the above rules of age group in a background color and then if the mandatory rules are met, then it should highlight the club.
Or
My approach 2 - Is it possible to write a conditional statement(multiple if statements or any other) to check if a club has all these mandatory teams of age groups, then use this new column to highlight the clubs/teams matching the rules?
Kindly suggest the solution to this problem. Thanks in advance.
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
Please have a try.
measure= var_condition1=if(max(team[teamagegroup])="U8"||max(team[teamgender])="Girls"&&max(team[teamagegroup])="U14",insert result,otherwise.) var condition2=if(max(team[teamagegroup])="U9"||max(team[teamgender])="Girls"&&max(team[teamagegroup])="U15",insert result,otherwise) var _contiion3=(calculate(max(team[ageyear]),filter(all(team),club=selectedvalue{club)&&teams=selectedvalue(teams))))-(calculate(min(team[ageyear]),filter(all(team),club=selectedvalue{club)&&teams=selectedvalue(teams)))<=2) var _condition4=calculate(countrows(team),filter(all(team),club=selectedvalue(club)&&[teamagegroup]=selectedvalue[teamagegroup])))If I have misunderstood your meaning, please provide your desired output with more details and you sample pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly