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, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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