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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
dsi
Frequent Visitor

Matrix Measures in rows and Percentage Of another measure

Hello,
I have a matrix visual with a switch over from columns to rows.

Now I would like to calculate the percentage for each row.
E.g

            -> Year/Month

Measure    |Value  |% from Masure C

Measure A | 10k    | 10%
Measure B | 90k    | 90%
Measure C | 100k  | 100%

 

7C8AAFDC-CF1E-444C-A549-4079AA9D4BF3.png

 

Any ideas or hints?

Thank you in advanced

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @dsi ,

Some slight adjustments are needed.

1. Create table -> enter data -> Table2:

vcgaomsft_1-1669190138882.png

2. then please new measures like:

Measure = 
SWITCH(
    MAX('Table2'[Category]),
    "Sales GER",[Sales GER],
    "Sales USA",[Sales USA],
    "Sales other",[Sales other],
    "Sales Total",[Sales Total]
)
Measure 2 = 
SWITCH(
    MAX('Table2'[Category]),
    "Sales GER",DIVIDE([Sales GER],[Sales Total]),
    "Sales USA",DIVIDE([Sales USA],[Sales Total]),
    "Sales other",DIVIDE([Sales other],[Sales Total]),
    "Sales Total",DIVIDE([Sales Total],[Sales Total])
)

3. result:

vcgaomsft_2-1669190440962.png

vcgaomsft_3-1669190526754.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @dsi ,

Some slight adjustments are needed.

1. Create table -> enter data -> Table2:

vcgaomsft_1-1669190138882.png

2. then please new measures like:

Measure = 
SWITCH(
    MAX('Table2'[Category]),
    "Sales GER",[Sales GER],
    "Sales USA",[Sales USA],
    "Sales other",[Sales other],
    "Sales Total",[Sales Total]
)
Measure 2 = 
SWITCH(
    MAX('Table2'[Category]),
    "Sales GER",DIVIDE([Sales GER],[Sales Total]),
    "Sales USA",DIVIDE([Sales USA],[Sales Total]),
    "Sales other",DIVIDE([Sales other],[Sales Total]),
    "Sales Total",DIVIDE([Sales Total],[Sales Total])
)

3. result:

vcgaomsft_2-1669190440962.png

vcgaomsft_3-1669190526754.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Thanks for Help. 

I‘m also found a similar solution.
It works fine.

Have a nice day

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.