cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## matrix total

Hi

I use Switch in a matrix, because i love switch 😀 and it avoid me to use the filters panel

But i don't understand how to calculate my total at the bottom ....

Thanks for explaination, that i can use to solve my case

here my file

https://1drv.ms/u/s!AoqtZHsX4BzvhIB1Mul5moH-QFilNw?e=Iz3Xkc

Nicolas

1 ACCEPTED SOLUTION
Super User

Hi,

I am not sure which measure you want to fix, but if you want to fix the [Group I] measure, please try the below.

``````GROUPE I =
SUMX (
VALUES ( 'fusion Balances Ts Dos'[Affectation] ),
CALCULATE (
SWITCH (
TRUE (),
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Achats", [Achats],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Autres Prestations", [Autres Prestations],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Déplacements, missions et réceptions", [Déplacements, missions et réceptions],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Frais postaux et frais de télécommunications", [Frais postaux et frais de télécommunications]
)
)
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

2 REPLIES 2
Helper IV

Thanks a lot

Sorry yes it was the good mesure

It works

I will now working on your solution to understand !!

Have a nice day

Super User

Hi,

I am not sure which measure you want to fix, but if you want to fix the [Group I] measure, please try the below.

``````GROUPE I =
SUMX (
VALUES ( 'fusion Balances Ts Dos'[Affectation] ),
CALCULATE (
SWITCH (
TRUE (),
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Achats", [Achats],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Autres Prestations", [Autres Prestations],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Déplacements, missions et réceptions", [Déplacements, missions et réceptions],
SELECTEDVALUE ( 'fusion Balances Ts Dos'[Affectation] ) = "Frais postaux et frais de télécommunications", [Frais postaux et frais de télécommunications]
)
)
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors