Forum Discussion
Creating table with categories from 2 columns in 1 column
- 4 years ago
Unpivoting as hashtag_pete suggests is a good idea but it does bring complications. One approach would be to do this unpivot in a separate table so that you have a Domains table like this:
and an Articles table like this:
And have them related like this:
Hi Pete,
Would that imply that I first have to duplicate the query? Because when I unpivot, those articles that have two domains show up as two different rows. For some other measures I have written DAX that for example averages the number of views:
Views(average) =
AVERAGE(LinkedIn[Views])
Since, after unpivoting, one article can show up in two rows, I guess those measures do not give me the correct value anymore, right? I could solve this by duplicating the query and doing your trick in that query. Or could you think of a better way? Thanks!
Unpivoting as hashtag_pete suggests is a good idea but it does bring complications. One approach would be to do this unpivot in a separate table so that you have a Domains table like this:
and an Articles table like this:
And have them related like this:
- Anonymous4 years agoNot applicable
Thank you Alexis, this is the approach that works best!