Forum Discussion
Brenda_Loznik
Advocate II
3 years agoSummarize while ignoring context
Hi, I'm trying to create a measure that sums FCT_Contract[NumberOfContracts] for each Dim_Customer[HoldingName], but only when there is a holding (i.e. HoldingName <> Blank()). I have tried ...
- 3 years ago
its ok well im not sure about your dataset but i replicated just the table you provided above
create the new measureTotal by Holding = CALCULATE([Number of Contracts],ALLEXCEPT('Table','Table'[HoldingName]),'Table'[Holding] = 1)
eliasayyy
Memorable Member
3 years agoso you do not want the 0 right ?
NumberOfContractsHolding =
var summarizedtable = Summarize(
filter(FCT_Contract, AND(related( DIM_Customer[Holdingname]) = 1 , related( DIM_Customer[Holdingname]) <> Blank()),
DIM_Customer[Holdingname],"Amount" , [NumberOfContracts])
var result = sumx(summarizedtable ,[Amount])
return result
- Brenda_Loznik3 years ago
Advocate II
Hi,
Thanks for your time.
I actually want to create the red numbers in my table (I probably should have used a different color...).
I expect that different customers belonging to the same holding will receive the same output, but unfortunately this is not the case.
Unfortunately this Dax measure also doesn't quite aggregate the date the way I would like.
- eliasayyy3 years ago
Memorable Member
its ok well im not sure about your dataset but i replicated just the table you provided above
create the new measureTotal by Holding = CALCULATE([Number of Contracts],ALLEXCEPT('Table','Table'[HoldingName]),'Table'[Holding] = 1)