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
Hi
I have a switch who show Dax formula in case of a match with my matrix column name:
Switch CA =
SWITCH(true(),
SELECTEDVALUE(Matrice[Titre])="Epicerie",CAHebdo[CA Epicerie],
SELECTEDVALUE(Matrice[Titre])="Liquide",CAHebdo[CA Liquide],
SELECTEDVALUE(Matrice[Titre])="Entretien",CAHebdo[CA Entretien],
SELECTEDVALUE(Matrice[Titre])="Beauté",CAHebdo[CA Beaute] ,
SELECTEDVALUE(Matrice[Titre])="DPH",CAHebdo[CA DPH]
)
All work except the last one who is a total of the other :
CA Epicerie =
Var Section = 6
Return
CALCULATE(SUM(CAHebdo[CA]),CAHebdo[SectionAbaco]=Section)
CA DPH = CAHebdo[CA Beaute]+CAHebdo[CA Entretien]
I try to understand why, but i didn(t understand
https://1drv.ms/u/s!AoqtZHsX4BzvhI9pGmF1KVaJ8wwljQ?e=knTvkk
Thanks for helping
Solved! Go to Solution.
Hi @nicolast29 ,
in my opinion the measure Switch works only if you create a calculated table filtered for the codes 8 and 9, because the relationship 1 to many between tables 'Matrice' and 'CAHebdo' allows no calculation for the item DPH (DPH is code 10 and code 10 does not exist in the fact table).
Anyway you can find my solution here in the link.
https://1drv.ms/u/s!Aj45jbu0mDVJi15CYVnv2JZWf3iV?e=Pmw7FG
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nicolast29 ,
in my opinion the measure Switch works only if you create a calculated table filtered for the codes 8 and 9, because the relationship 1 to many between tables 'Matrice' and 'CAHebdo' allows no calculation for the item DPH (DPH is code 10 and code 10 does not exist in the fact table).
Anyway you can find my solution here in the link.
https://1drv.ms/u/s!Aj45jbu0mDVJi15CYVnv2JZWf3iV?e=Pmw7FG
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
Thanks now i understand my mistake
Have a nice day
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |