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, %])
Robin_Lindstrom
Apr 14, 2021Copper Contributor
Subodh_Tiwari_sktneer
Apr 14, 2021Silver Contributor
Create the below measure first...
Brutto_M_All_Arena :=
CALCULATE (
CALCULATE (
SUMX (
Arena,
Arena[Kontakter 8.33%] * Arena[CPC]
),
ALL ( Arena[Arena] )
),
CROSSFILTER ( Arena[ArenaCode], Arena_Paket[ArenaCode], BOTH )
)
And then modify your weighted measure like below...
Weighted %_2:=DIVIDE([Brutto_M],[Brutto_M_All_Arena])
And see if that returns what you are trying to visualize.
- Robin_LindstromApr 15, 2021Copper Contributor
- Subodh_Tiwari_sktneerApr 15, 2021Silver ContributorYou're welcome Robin_Lindstrom!