March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'd like to sum columns from differents tables depending of the filter i apply :
- If i select "CRC1", i'd like to sum the amount of calls registered in the table "CRC1 - NB APPELS".
- If i select "CRC 2", i'd like to sum the amount of calls registered in the table "CRC2 - NB APPELS".
etc
I did this measure :
Solved! Go to Solution.
Hi @HugoREGIS -can you cross check once on, if all tables (CRC1 - NB APPELS, CRC2 - NB APPELS, etc.) have valid relationships with the filter table (Table correspondance CRC), or that they're all independent.
check the Modified measure:
Measure Call Count =
SWITCH(
TRUE(),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 1", CALCULATE(SUM('CRC1 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 2", CALCULATE(SUM('CRC2 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 3", CALCULATE(SUM('CRC3 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 4", CALCULATE(SUM('CRC4 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 5", CALCULATE(SUM('CRC5 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "REP 1", CALCULATE(SUM('REP1 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "REP 2", CALCULATE(SUM('REP2 - NB APPELS'[Nombre d'appels externes])),
"Non attribué"
)
Let me know if this resolves your issue or if there’s something else to investigate!
Proud to be a Super User! | |
Hi @HugoREGIS
Thanks for the reply from rajendraongole1 , FlipFlop1 and Tahreem24 .
Did rajendraongole1 's and FlipFlop1 's methods solve your problem? If yes, could you please mark them as solutions? This will be of great help to other users experiencing similar problems. Thank you!
In my test, the tables can be calculated normally regardless of whether there is a relationship between them. The following is my test for your reference.
My sample:
Measure:
Measure = SWITCH(TRUE(),
SELECTEDVALUE(Slicer[Category]) = "A", SUM('A Table'[Value]),
SELECTEDVALUE(Slicer[Category]) = "B", SUM('B Table'[Value])
)
Output:
1. no relationships
2. have relationships
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @HugoREGIS
Thanks for the reply from rajendraongole1 , FlipFlop1 and Tahreem24 .
Did rajendraongole1 's and FlipFlop1 's methods solve your problem? If yes, could you please mark them as solutions? This will be of great help to other users experiencing similar problems. Thank you!
In my test, the tables can be calculated normally regardless of whether there is a relationship between them. The following is my test for your reference.
My sample:
Measure:
Measure = SWITCH(TRUE(),
SELECTEDVALUE(Slicer[Category]) = "A", SUM('A Table'[Value]),
SELECTEDVALUE(Slicer[Category]) = "B", SUM('B Table'[Value])
)
Output:
1. no relationships
2. have relationships
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@HugoREGIS It would be good if you can share the sample dummy data. So will try out at my end.
Try:
Measure =
VAR Type = SELECTEDVALUE('Table correspondance CRC'[Type])
RETURN
Hi @HugoREGIS -can you cross check once on, if all tables (CRC1 - NB APPELS, CRC2 - NB APPELS, etc.) have valid relationships with the filter table (Table correspondance CRC), or that they're all independent.
check the Modified measure:
Measure Call Count =
SWITCH(
TRUE(),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 1", CALCULATE(SUM('CRC1 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 2", CALCULATE(SUM('CRC2 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 3", CALCULATE(SUM('CRC3 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 4", CALCULATE(SUM('CRC4 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "CRC 5", CALCULATE(SUM('CRC5 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "REP 1", CALCULATE(SUM('REP1 - NB APPELS'[Nombre d'appels externes])),
SELECTEDVALUE('Table correspondance CRC'[Type]) = "REP 2", CALCULATE(SUM('REP2 - NB APPELS'[Nombre d'appels externes])),
"Non attribué"
)
Let me know if this resolves your issue or if there’s something else to investigate!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |