Quantcast
Viewing all articles
Browse latest Browse all 217137

Table transformation

I am looking for help to transpose/transform a table so that I could create a useful waterfall chart out of the output.

 

For example:  The source table looks like this:

WaveCat1Cat2Cat3Cat4
Product 1$11.60$91.51$86.41$18.27
Product 2$32.71$29.30$96.82$84.40
Product 3$83.06$14.36$68.78$83.72
Product 4$77.71$15.72$94.48$40.85
Product 5$94.78$36.84$68.96$12.38
Product 6$0.92$42.69$81.30$23.58
Product 7$8.39$30.20$70.32$96.37
Product 8$18.51$88.55$49.71$72.65
Product 9$71.56$58.05$53.13$27.28

 

I need to transform it into the following table using DAX or Query editor:

CategoryProductValue
Cat 1Product 1$11.60
Cat 1Product 2$32.71
Cat 1Product 3$83.06
Cat 1Product 4$77.71
Cat 1Product 5$94.78
Cat 1Product 6$0.92
Cat 1Product 7$8.39
Cat 1Product 8$18.51
Cat 1Product 9$71.56
Cat 2Product 1$91.51
Cat 2Product 2$29.30
Cat 2Product 3$14.36
Cat 2Product 4$15.72
Cat 2Product 5$36.84
Cat 2Product 6$42.69
Cat 2Product 7$30.20
Cat 2Product 8$88.55
Cat 2Product 9$58.05
Cat 3Product 1$86.41
Cat 3Product 2$96.82
Cat 3Product 3$68.78
Cat 3Product 4$94.48
Cat 3Product 5$68.96
Cat 3Product 6$81.30
Cat 3Product 7$70.32
Cat 3Product 8$49.71
Cat 3Product 9$53.13
Cat 4Product 1$18.27
Cat 4Product 2$84.40
Cat 4Product 3$83.72
Cat 4Product 4$40.85
Cat 4Product 5$12.38
Cat 4Product 6$23.58
Cat 4Product 7$96.37
Cat 4Product 8$72.65
Cat 4Product 9$27.28

 

so that I can then create the following waterfall cart with filter out of the transformed table like this:

 

Image may be NSFW.
Clik here to view.
waterfall with filter.png


 

Is there a way to do this?


Viewing all articles
Browse latest Browse all 217137

Trending Articles