Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
stevedata
Frequent 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 first screenshot below, with each bar representing a product %. But I want to achieve vice versa – i.e. each bar representing region % and each grouping representing product.

example1.png

example2.jpg

Each measure looks like this:

Product1 =

SWITCH(TRUE(),

    SELECTEDVALUE(AllRegions[Region]) = "GLOBAL"

    , CALCULATE('#Product1'[#Product1responded%], ALL(AllRegions[Region]))

    , '#Product1'[#Product1responded%])

 

I want to get to this:

example3.jpg

Can anyone help?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

vjiewumsft_0-1716791809688.png

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_)

vjiewumsft_1-1716791829060.png

3.Create the new table for the product measure.

vjiewumsft_3-1716791860557.png

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.

vjiewumsft_2-1716791842265.png

6.Drag the measure into the Y-axis and drag the Region into the Legend.

vjiewumsft_4-1716791881394.png

7.The result is shown below.

vjiewumsft_5-1716791888678.png

 

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.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

vjiewumsft_0-1716791809688.png

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_)

vjiewumsft_1-1716791829060.png

3.Create the new table for the product measure.

vjiewumsft_3-1716791860557.png

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.

vjiewumsft_2-1716791842265.png

6.Drag the measure into the Y-axis and drag the Region into the Legend.

vjiewumsft_4-1716791881394.png

7.The result is shown below.

vjiewumsft_5-1716791888678.png

 

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.

Ritaf1983
Super User
Super User

Hi @stevedata 
Please refer to my solution in the linked discussion.

https://community.fabric.microsoft.com/t5/Desktop/Spacing-between-bars-for-clustered-column-chart-th...

It includes a pbix with an example.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors