Forum Discussion
Dax Calculation for distinct Values
- 5 years ago
Anonymous ,
only Call =
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "Call"))),
[_1] =[_2]) ,[Account] )only inperson=
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "inperson"))),
[_1] =[_2]) ,[Account] )only msg=
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "msg"))),
[_1] =[_2]) ,[Account] )Mutiple Interactions =
countx(filter(summarize(Table, Table[Account], "_1", distinctcount(Table[Interaction Type])),
[_1] >=2) ,[Account] )
Anonymous ,
only Call =
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "Call"))),
[_1] =[_2]) ,[Account] )
only inperson=
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "inperson"))),
[_1] =[_2]) ,[Account] )
only msg=
countx(filter(summarize(Table, Table[Account], "_1", count(Table[Interaction Type])
, "_2",calculate(count(Table[Interaction Type]), filter(Table, Table[Interaction Type]= "msg"))),
[_1] =[_2]) ,[Account] )
Mutiple Interactions =
countx(filter(summarize(Table, Table[Account], "_1", distinctcount(Table[Interaction Type])),
[_1] >=2) ,[Account] )
Hi Amit,
there is one more scenario to add to this. if the interaction Type is blank then we should not be counting those records . but the above formula is counting in all individual counts(only Call,only msg,only inperson) which is bit off. could you please help how to avoid counting blanks)
Thank you.