Reputation: 1134
I have a dataset that looks like
Baseball|Basketball|FootBall|Soccer|State
Player 1 1 0 0 1 NY
Player 2 1 1 0 0 CA
Player 3 1 1 1 1 NY
Player 4 0 0 0 1 MA
I would like to create a graph or worksheet in my dashboard that would show
Baseball 3
Basketball 2
Football 1
Soccer 3
Also have it be dynamic so that if i change the filter to CA it would adjust
Baseball 1
Basektball 1
Football 0
Soccer 0
Upvotes: 0
Views: 55
Reputation: 4967
In Power query, you need to select the columns Baseball, Basketball, Football, Soccer, and select the Unpivot option, which should give you something like this, with two new columns 'attributes' and 'value'
I've renamed attributes 'Sports'
Once you have done that, you can create a basic measure
Sports Total = SUM('Table'[Value])
You can then slice and dice the data by whatever you like
Upvotes: 2