Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage Distinct Count don´t work

Please look at the pictures, and tell me what´s wrong.

I want to pick a state and with it the respective percentage, but the formula Count(DISTINCT SIG)/Count(TOTAL DISTINCT SIG) don´t work!

PERCENTAGEM2.jpg

PERCENTAGEM1.jpg

1 Solution

Accepted Solutions
OmarBenSalem

Try to use your expression in a table; as a measure, It will work.

When you use it as a KPI, it will return 100%, since you've made no selection yet.

And with the current way it is, even if you select a State, you'll have 100%, since the count(TOTAL DISTINCT SIG) will be filtered just to your selection, thus :

Count(DISTINCT SIG) will be extactly the same as Count(TOTAL DISTINCT SIG):


Which is the SIG count of the selected state .

to prevent this:

Do as follow: Count(DISTINCT SIG)/Count({<STATE>} TOTAL DISTINCT SIG)

View solution in original post

8 Replies
sushil353
Master II
Master II

if this is text object then count(distinct sig) and count(Total Distinct sig) will give same result..

change your denominator accordingly

Not applicable
Author

But can you show me the solution (formula)?

OmarBenSalem

Try to use your expression in a table; as a measure, It will work.

When you use it as a KPI, it will return 100%, since you've made no selection yet.

And with the current way it is, even if you select a State, you'll have 100%, since the count(TOTAL DISTINCT SIG) will be filtered just to your selection, thus :

Count(DISTINCT SIG) will be extactly the same as Count(TOTAL DISTINCT SIG):


Which is the SIG count of the selected state .

to prevent this:

Do as follow: Count(DISTINCT SIG)/Count({<STATE>} TOTAL DISTINCT SIG)

Not applicable
Author

Can i do it with two criteria like state as above or by country (add country):

Count(DISTINCT SIG)/Count({<STATE OR COUNTRY>} TOTAL DISTINCT SIG)

OmarBenSalem

Sure !

You want the total to not change if you select a country?

Count(DISTINCT SIG)/Count({<STATE=,COUNTRY=>} TOTAL DISTINCT SIG)

dineshraj
Partner - Creator
Partner - Creator

Hi,

Contribution can't be displayed in KPI and Text Box(if no fields selected). Try Some other charts

Thanks and Regards

Dinesh

Not applicable
Author

thank you.

I want to select different filters and give me the KPI percentage, so i  think i only need to add criteras in the formula like you have me shown {<STATE=,COUNTRY=,YEAR...>}

OmarBenSalem

If you want your total part to always be invariant, no matter what selection you make;

add {1} instead.

Count(DISTINCT SIG)/Count({1} TOTAL DISTINCT SIG)


That means, no matter what you select, it will always show the total