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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rennda
Frequent Visitor

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..

 

Average.JPG

 

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 2
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.

 

Average.JPG

sturlaws
Resident Rockstar
Resident Rockstar

Hi,

perhaps you could post a sample dataset? And also take a look at this: How to Get Your Question Answered Quickly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.