Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
levent1a
Contributor III
Contributor III

AVG und Networkdays

Hallo,

 

ich habe folgende Formel 

=networkdays([Datum1],[Datum2])

Es gibt mehrere Werte für Datum1 und Datum2.

Ich möchte in einem Balkendiagramm einen Durchschnittswert pro Monat anzeigen lassen.

Habe es leider nicht hingekriegt.

 

Die Datumsfelder kommen im Load so zustande:

Datum1:

if(Bez='XYZ',date(DatumX, 'DD.MM.YYYY')) as Datum1

Datum2: 

if(Bez='ABC',date(DatumX, 'DD.MM.YYYY')) as Datum2

 

Was muss ich tun?

Labels (4)
2 Replies
levent1a
Contributor III
Contributor III
Author

Hat niemand einen Tipp für mich??

Chanty4u
MVP
MVP

try this

Chart:
LOAD
Bez,
if(Bez='XYZ', date(DatumX, 'DD.MM.YYYY')) as Datum1,
if(Bez='ABC', date(DatumX, 'DD.MM.YYYY')) as Datum2
FROM YourSource;

ChartAvg:
LOAD
Bez,
Month(Datum) as Month,
Avg(NetworkDays(Datum1, Datum2)) as AvgNetworkDays
RESIDENT Chart
GROUP BY Bez, Month(Datum1), Month(Datum2);

DROP TABLE Chart;