Forum Discussion
Sum Unique Rows after Unpivot
- 9 years ago
I’m not sure the visual/table you want now. If you just want to count the # Seats column for each unique row based on the ID column. Just create a new table with following formula.
Best Regards,
Herbert
Did you end up finding a solution?
You can always randomize some data and send us a dummy file, stripping out any confidential names or values. We just need the table(s) in the same structure.
- Anonymous9 years agoNot applicable
BKnecht easiest way to share a problem query is to use a fake data source. This site makes it pretty easy to create dummy test data for such cases. Make something that looks like the important parts of your source data and run it through the same query steps to show us what you're attempting.
- BKnecht9 years agoKudo Kingpin
Anonymous wrote:BKnecht easiest way to share a problem query is to use a fake data source. This site makes it pretty easy to create dummy test data for such cases. Make something that looks like the important parts of your source data and run it through the same query steps to show us what you're attempting.
Anonymous wrote:BKnecht easiest way to share a problem query is to use a fake data source. This site makes it pretty easy to create dummy test data for such cases. Make something that looks like the important parts of your source data and run it through the same query steps to show us what you're attempting.
AnonymousAnonymous - Unfortunately I did not find a solution, I just brought in the table a second time (it isn't a big table). It's not ideal because now I have to update 2 tables every month, but I had to get this dashboard out to leadership.
That mock data website is great - thanks for sharing. I've attached a PBIX file of what the table and query steps look like. What I'm trying to do is count the # Seats column for each unique row based on the ID column. So for example, the count of seats for ID 1 would be 20, and for 2 it would be 89, etc.
Again, the problem is now that I've unpivoted the data so there are multiple rows for each ID. Any suggestions? Thank you for the help!
Stupid question - how do I attach the pbix file to this post? I don't see a file attachment option anywhere.
- Anonymous9 years agoNot applicable
BKnecht I don't think there is a file upload option here. You'll have to put it on dropbox or google drive or something and give us a link.
- Anonymous9 years agoNot applicable
I have the same issue. I need to get counts of several columns like above table 1. also i need to unpivot like table 2. but need to get the actual count of rows (before unpivoting count). how to get that?
Thanks.
- v-haibl-msft9 years agoMicrosoft Employee
Anonymous
Try to create a measure with following formula.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[ID] ), ALLEXCEPT ( Table1, Table1[Month] ) )Best Regards,
Herbert
- Anonymous9 years agoNot applicable
It worked for a Card, only for showing the count. thnks alot. but If we need to show a count/or a sum of columns by a different data legand by a bar chart, it won't react. please find the attached pics. It works for a card.it wont work for this type of chart