0
votes

I created two measures in Power BI called Count of Appointment Status for Kept and Count of Appointment Status for DNS. These measures are counting and filtering values in Client'[Appointment Status]. I'm not sure if the CALCULATE and COUNTA functions are the best way to accomplish this task.

Count of Appointment Status for Kept = 
CALCULATE(
    COUNTA('Client'[Appointment Status]),
    'Client'[Appointment Status] IN { "Kept" }
)


Count of Appointment Status for DNS = 
CALCULATE(
    COUNTA('Client'[Appointment Status]),
    'Client'[Appointment Status] IN { "DNS" }
)

Percentage of Total No Show = 
FORMAT(
     CALCULATE(Client[Count of Appointment Status for Kept])
     /Client[Count of Appointment Status for DNS])
     , "0.00%)

Nevertheless, I'm trying to create a measure to calculate the percent of "No Show". When I do it, the decimal places gives me an issue. For example, 8.50 turns into 850.0%. I'm sure there is a syntax issue, I just don't know where.

3
Is Kept always less than DNS in terms of counting?Alexis Olson
No, Kept is usually more.M.T Davis
So why is 850.0% incorrect?Alexis Olson

3 Answers

0
votes

I have faced this issue in the past - power bi tends to multiply by 100 when using % the way I get around it is by just dividing by 100 eg

Percentage of Total No Show = FORMAT( CALCULATE(Client[Count of Appointment Status for Kept]) /(Client[Count of Appointment Status for DNS]) * 100) , "0.00%)

0
votes

This was the correct solution:

Percentage of Total No Show =
FORMAT (
    (
        CALCULATE (
            Client[Count of Appointment Status for Kept]
        ) / Client[Count of Appointment Status for DNS]
    ) / 100,
    "0.00%"
)
0
votes

First we have to create column by using below formula (each individual value) / (sum of all values) and type is number

enter image description here

after that select the column and mention format is percentage symbol

enter image description here