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.
Hey guys, I have a problem counting the difference of two averages. I keep getting a result of 0 despite filtering the data. I have a table that looks like this:
Player | Score | Player2 | Score2 |
A | 8 | A | 8 |
B | 7 | B | 7 |
C | 6 | C | 6 |
D | 8 | D | 8 |
I simply added two additional columns to use them separately in the slicer, unfortunately it doesn't work 😀
My visualization:
TEAM I and TEAM II are averages of selected players. I would like Team_results to count the difference in averages between teams after selecting players on both sides.
Solved! Go to Solution.
Linking both slicers to the same table won't work, you need to create two new tables for the slicers, like
Team I = DISTINCT('Table'[Player])
Link both Team I and Team II to your existing table and use the player column from the new tables on the slicer.
You can then create measures like
Team I Avg =
CALCULATE ( AVERAGE ( 'Table'[Score] ), REMOVEFILTERS ( 'Team II' ) )
Team II Avg =
CALCULATE ( AVERAGE ( 'Table'[Score] ), REMOVEFILTERS ( 'Team I' ) )
Team results = [Team I Avg] - [Team II Avg]
Thank you very much for your time and help 🙂
Linking both slicers to the same table won't work, you need to create two new tables for the slicers, like
Team I = DISTINCT('Table'[Player])
Link both Team I and Team II to your existing table and use the player column from the new tables on the slicer.
You can then create measures like
Team I Avg =
CALCULATE ( AVERAGE ( 'Table'[Score] ), REMOVEFILTERS ( 'Team II' ) )
Team II Avg =
CALCULATE ( AVERAGE ( 'Table'[Score] ), REMOVEFILTERS ( 'Team I' ) )
Team results = [Team I Avg] - [Team II Avg]
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |