cancel
Showing results for
Did you mean:
Frequent Visitor

Showing card value as a percent of total

Hi!

I've created 2 cards with different values from the same column according by the date. Follow images for a better undestanding:

Assuming that are 19 entries for 05/08/2017, 16 entries as "Atendidas" and 3 entries "Abandonadas", how can I change the card value to percentual of the total (84% Atendidas / 16% Abandonadas) ?

Tks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Member

Re: Showing card value as a percent of total

There are multiple ways to do this, here is one: Create a new measure

CALCULATE (
COUNTA ( Table1[Disposicao do Contato] ),
)
RETURN
DIVIDE ( Total_of_Abandonadas, COUNTA ( Table1[Disposicao do Contato] ) )

Remember, the VAR function just allows you to put all the needed calculations into one measure.  You can just make multiple measures and build them up.  Example:

Build a new measure to get the count of Abandonadas
CALCULATE (
COUNTA ( Table1[Disposicao do Contato] ),
)

% of Abandonadas = DIVIDE ( Total Abandonadas, COUNTA ( Table1[Disposicao do Contato] ) )
3 REPLIES 3
Super User

Re: Showing card value as a percent of total

You should be able to click the drop down on your field and expand "Show value as" and then "Percent of grand total".

If not, then you would need to create a couple measures like:

`Attendees = CALCULATE(COUNT([Contado]),FILTER(Table,[Contado]="Attendee")) / CALCULATE(COUNT([Contado]),ALL(Table))`

Proud to be a Datanaut!

Highlighted
Member

Re: Showing card value as a percent of total

There are multiple ways to do this, here is one: Create a new measure

CALCULATE (
COUNTA ( Table1[Disposicao do Contato] ),
)
RETURN
DIVIDE ( Total_of_Abandonadas, COUNTA ( Table1[Disposicao do Contato] ) )

Remember, the VAR function just allows you to put all the needed calculations into one measure.  You can just make multiple measures and build them up.  Example:

Build a new measure to get the count of Abandonadas
CALCULATE (
COUNTA ( Table1[Disposicao do Contato] ),
)

% of Abandonadas = DIVIDE ( Total Abandonadas, COUNTA ( Table1[Disposicao do Contato] ) )
Frequent Visitor

Re: Showing card value as a percent of total

Thanks @adamflath! Using the VAR function solve the problem! But when I change the day that there're no entry of "abandonadas", the card shows (Blank).

```% of Atendidas = VAR Total_of_Atendidas = CALCULATE (COUNTA ('Relatório Detalhado de Chamadas'[Disposição do Contato]);'Relatório Detalhado de Chamadas'[Disposição do Contato] = "Atendidas")