Forum Discussion
Robin_Lindstrom
Apr 14, 2021Copper Contributor
Help with DAX formula
Hello everyone, I need some help regarding DAX. So in my example, I have 5 Arenas ( i.e., products) where I am trying to create a DAX-formula showing total "OO GM%" (Gross Margin%). In order ...
- Apr 14, 2021
As variant
Weighted %%:=VAR allBrutto=CALCULATE( [Brutto_M], ALLEXCEPT(Arena,Arena[ArenaCode]) ) RETURN DIVIDE([Brutto_M], allBrutto) OO GM, %%:=IF ( ISFILTERED( Arena[Arena]), [Weighted %%]*[Revshare_M], [OO GM, %])
Subodh_Tiwari_sktneer
Apr 14, 2021Silver Contributor
Or you may modify the measure like this...
OO GM% :=
IF (
ISFILTERED ( Arena[Arena] ),
[Revshare_M] * [Weighted %],
SUMX (
Arena,
[Revshare_M] * [Weighted %]
)
)
- Robin_LindstromApr 14, 2021Copper Contributor
This actually works, but when displaying more than one package the "weighted" should pay attention to the individual package and should always add upp to 100%, otherwise it seems to work.
Any ideas? 🙂
br,R
- Subodh_Tiwari_sktneerApr 14, 2021Silver ContributorCan you mock up the desired output as you did in your first sample file and upload it again?
- Robin_LindstromApr 14, 2021Copper Contributor