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

Avg () on count if conditions

Hello community,

I'm trying to get average values for defined conditions. I created a workaround looking like this:

 

Round
	(Count(
	if(AG_Aufgabentyp = 'Carrier Einkauf: Vorleistung Carrier kündigen' and AG_Fktn_Pool = 'Demontage',Aufgaben_ID) or
	if(AG_Aufgabentyp = 'Carrier Einkauf: Carrier Umsetzung bestätigen' and AG_Fktn_Pool = 'Produktion_Änderung',Aufgaben_ID) or
	if(AG_Aufgabentyp = 'Carrier Einkauf: Carrier und Vorleistungskosten ermitteln' and AG_Fktn_Pool = 'Anfrage',Aufgaben_ID))

/

(Max(Num(Month(AG_Ende)))),0.01)

 

This works fine looking completely on all months of the current year. But I need to get more flexible. I'd like to get correct results by selecting any months in filter. I believe I need to combine Avg() with count if somehow. Shouldn't be to difficult, but I never worked with avg() before. Any help?

 

Labels (2)
1 Reply
sasiparupudi1
Master III
Master III

In a straight table,

Dimension :Month(AG_Ende)

 

expression:

Avg(
{<
AG_Aufgabentyp ={'Carrier Einkauf: Vorleistung Carrier kündigen','Carrier Einkauf: Carrier Umsetzung bestätigen','Carrier Einkauf: Carrier und Vorleistungskosten ermitteln'},
AG_Fktn_Pool={'Demontage','Produktion_Änderung','Anfrage')
>}
Aufgaben_ID)