The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a dataset which looks like this. Each contract has multiple tags
Contract Title | Award Value | Tag A | TAG B | TAG C |
AAAA | DDDD | CCCC | ||
BBBB | DDDD | |||
CCCC | AAAA |
I want to create a table which displays the total award value across each tag.
Solved! Go to Solution.
Hi,
I recommend unpivoting your tag columns and using a simple SUM measure. This should get yo uthe result you want.
Proud to be a Super User!
Hi,
I recommend unpivoting your tag columns and using a simple SUM measure. This should get yo uthe result you want.
Proud to be a Super User!
All tags were in a single cell, so I separted them in different columns. Can you help with the dax code if possible?
Just as a clarification: do you want to show it like TAG A: value or like AAAA: value?
Proud to be a Super User!
AAAA value, so that I can identify the tags with the overall highest award value.
Okay, Then there are limitations in DAX solution, since you would have to refer to each column separately. How many "Tag"-columns d oyou have?
Proud to be a Super User!
I have 47 such columns
Yeah, In that case the best solution would be to unpivot these columns like this:
So in PQ select the column and unpivot them.
Proud to be a Super User!
This was helpful! While double counting is unavoidable if I want to display the award value for tags, it is not preferable for contract title as that would be a misrepresentation. Is there a way to work around that?
@Anonymous I am not sure I follow. If you want to count distinct values you can include filters or use functions like DISTINCT in your measures. Now that you have unpivoted data what is your desired end result?
Proud to be a Super User!
I plan to make two tables:
1. Contract Title and award value
2. Tags and award value
I want these two to interact with each other. But I want the Contract Title to not display duplicate values as we have unpivoted the columns.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
13 | |
10 | |
10 | |
9 |