Forum Discussion
stevedata
2 years agoFrequent Visitor
DAX measure in x axis help needed
Hi all I have 4 measures (product1, product2, product3, product4) that I want to have in a chart. I am trying to show a chart with the measures in the x axis. Currently I can get to the firs...
- Anonymous2 years ago
Hi stevedata ,
First of all, many thanks to for your very quick and effective replies.
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the multiple measures for the product.
Product 1 = VAR produc_1 = CALCULATE(SUM('Table'[Sales]), FILTER('Table', 'Table'[Product ID] = 1)) var tota_ = SUM('Table'[Sales]) RETURN DIVIDE(produc_1, tota_)3.Create the new table for the product measure.
4.Create the new measure to display product percentage.
Product group = SWITCH( TRUE(), SELECTEDVALUE('Product'[Product]) = "Product 1", [Product 1], SELECTEDVALUE('Product'[Product]) = "Product 2", [Product 2], SELECTEDVALUE('Product'[Product]) = "Product 3", [Product 3], SELECTEDVALUE('Product'[Product]) = "Product 4", [Product 4] )5.Select the Percentage Format for the new measure.
6.Drag the measure into the Y-axis and drag the Region into the Legend.
7.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.