Forum Discussion
Transposing columns
Hello,
I need to create something similar to the screenshot below.
I have TABLE 1 as a SharePoint list. I need to move the columns with First_Value into rows, because I need to continue working with those values + their data in the Slicer filter as well. However, when I transpose, i.e. unpivot these columns to rows, the values are duplicated. All values are fine when duplicated, but the Hours column takes on a completely different meaning. For example, there are 8 hours for From_To 6-14. However, if I transpose it, there are already more hours, but I cannot work with this number because it makes a different sense.
I would probably need an arithmetic mean or some solution to solve this. Can you help me? Thank you
4 Replies
- christinepaytonMost Valuable Professional
Typically if you don't want to duplicate rows, you'd just reference or duplicate the query and remove all columns except the row ID and the column you want to unpivot in the second query, then unpivot, and create a relationship between the two tables on the ID field. You may need to set the relationship to bidirectional to get the filtering to go the correct direction.
- Ashish_MathurSuper User
Hi,
You are performing the correct step i.e. "Unpivoting Other Columns". The values are bound to repeat. You will have to customise the DAX formulas to get your desired calculations workinng.
- Simon_29Helper II
Hi, thanks for advice.
Since I'm weaker in DAX, could you try to draw for me how this metric could look like? Thank you 🙂- Ashish_MathurSuper User
Hi,
Share data in a format that can be pasted in an MS Excel file and show the expected result very clearly.