Forum Discussion
Distnict count multiple columns
- 5 years ago
Hi,
For ProductA, the Status on % should be 1/3 i.e. 33.33%. Am i correct?
- 5 years ago
johndolan2 , % for A does not seems correct, Try like
Count of Status On = calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "ON"))
Count of Status Off = calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "OFF"))Off Status On % = divide([Count of Status On], [Count of Status On] +[Count of Status Off])
Status Off % =divide([Count of Status Off], [Count of Status On] +[Count of Status Off])or
Off Status On % = divide(calculate(count(Table[Sevice ID]) , filter(Table, Table[Status] = "ON")), count(Table[Sevice ID]))
Status Off % =divide(calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "OFF")) , count(Table[Sevice ID])) - 5 years ago
Hi Amitchandak - Thank you very much!!!
John
johndolan2 , % for A does not seems correct, Try like
Count of Status On = calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "ON"))
Count of Status Off = calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "OFF"))
Off Status On % = divide([Count of Status On], [Count of Status On] +[Count of Status Off])
Status Off % =divide([Count of Status Off], [Count of Status On] +[Count of Status Off])
or
Off Status On % = divide(calculate(count(Table[Sevice ID]) , filter(Table, Table[Status] = "ON")), count(Table[Sevice ID]))
Status Off % =divide(calculate(distinctcount(Table[Sevice ID]) , filter(Table, Table[Status] = "OFF")) , count(Table[Sevice ID]))
- johndolan25 years agoResolver I
Hi Amitchandak - Thank you very much!!!
John