Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Kenmare
Frequent Visitor

Count values which can be on two different columns

Hi there !

I'm creating a dashboard to study each strategy for a football team with these tables :

Kenmare_0-1697451326745.png

 

 

In my report: a slicer to select a team.
I want to display, for each strategy, how many times it has been used by a team.
Example for team 1:
4-4-2 --> 3
4-3-3 --> 3
3-5-2 --> 2

I created a table chart with Strategy Name and a measure with a countx for each Team_1_strategy_id or Team_2_strategy_id (because a team can be home or visitor) but it doesn't work.
Do you know if it's possible in PowerBI or I'm wasting my time ?

Thank you !

1 ACCEPTED SOLUTION
5 REPLIES 5
Kenmare
Frequent Visitor

Thank you @Ahmedx this is what I was searching for this visual.

@Anonymous the logic was to calculate the number of occurrences of each strategy: if the team plays at home (in team_1_id) + away (in team_2_id)

Anonymous
Not applicable

Hi @Kenmare ,

I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting and desensitized example data.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu

Hi @Anonymous 

 

Thank you for your answer. I'll try to explain no problem.

I put my example in the attached power pi file: https://1drv.ms/u/s!AoMg4cU4jocGpm2dOeYuSNkgKKw0?e=3iTrKT 

Here is a screenshot of the resultats expected : for a selected team, having the count of each strategy used :

Kenmare_0-1697702078775.png

Best regards.

Kenmare

Anonymous
Not applicable

Hi @Kenmare ,

Could you please provide the calculate logic? 

vbinbinyumsft_0-1697709215581.png

vbinbinyumsft_1-1697709292627.png

 

Best regards,
Community Support Team_Binbin Yu

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.