Forum Discussion

rennda's avatar
rennda
Frequent Visitor
7 years ago

Calculate single value against average with multiple filters

Hello everybody,

 

i hope you can help me with my actual issue:

 

I want to calculate the average of AZ_IN_MIN per category by the following code. I did this with  "ALLEXCEPT". But, there are additional two more filters i have to set. It should only build the average from Tickets within "Ticket Category 5 or 6" and tickets which are closed by a defined group of names. 

 

The shown table is already filtered by category and name. But the calculated average is wrong. In case of model bizhub C458 the average should be 44,25..

 

 

AZ AVG = CALCULATE(AVERAGE(Ticket_Kennzahlen_table[AZ_IN_MIN]); FILTER(ALLEXCEPT(Ticket_Kennzahlen_table;Ticket_Kennzahlen_table[Model]); Ticket_Kennzahlen_table[ticket_group] = 5 ||6 && Ticket_Kennzahlen_table[Name (Group)] = "varV"))

THANKS FOR HELP 

2 Replies

  • rennda's avatar
    rennda
    Frequent Visitor

    sturlaws 

     

    These columns are in the dataset: 

     

    Supplier | Model | TicketNo | IDNR | Name | Ticket Group | AZ in min | AZ AVG | AZ Performance

     

    *In filters i filter the Name by a Group called "varV"

     

    AZ AVG is a measure

    AZ AVG = CALCULATE(AVERAGE(Ticket_Kennzahlen_table[AZ_IN_MIN]); FILTER(Ticket_Kennzahlen_table; Ticket_Kennzahlen_table[ticket_Group] = 5 ||6 && Ticket_Kennzahlen_table[Name (Group)] = "varV"))

    AZ Performance  is a calculated column

    AZ Performance = DIVIDE(Ticket_Kennzahlen_table[AZ AVG];[AZ_IN_MIN])

    In a single visualisation, AZ AVG is calculated right. Only in the table visualisation it does not work.