Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Umformatieren

Hallo Leute,

Zurzeit befinde ich mich in einem Praktikum, wo ich mit QlikView arbeite.

Jetzt habe ich die Aufgabe ein normales Diagramm zu erstellen, jedoch kann man mit den Daten in der Tabelle, weder bei Excel noch mit QlikView rechnen lassen, natürlich könnte man die Daten schon in der Excel Tabelle so ändern das man, damit rechnen kann (z.B Geplante Ferientage 17,00 Tage) . Mein Praktikumsbetreuer ist er Ansicht das es zu einfach für mich wäre diese Sache in Excel um zu formatieren und ich solle es in QlikView machen.

Daher meine Frage: Wo kann ich QlikView die Daten so umformatieren, also z.B. von 17,00 Tage auf 17, dass ich damit rechnen kann.

Danke schon mal im voraus

Justin

1 Solution

Accepted Solutions
MarcoWedel

Hallo Justin,

instead of a string extraction of the numerical part of your time fields, you could also use the num#() function to evaluate the string like this:

tabResturlaub:

LOAD [Vor- und Nachname],

    Konto,

    Kontingenttext,

    Beginn,

    Ende,

    AbtrBeg,

    AbtrEnde,

    Num#(Anspruch, '#0,## Tage') as Anspruch,

    Num#(Verbraucht, '#0,## Tage') as Verbraucht,

    Num#(Genehmigt, '#0,## Tage') as Genehmigt,

    Num#(Ungenehmigt, '#0,## Tage') as Ungenehmigt,

    Num#(Geplant, '#0,## Tage') as Geplant,

    Num#([Anspruch abzüglich Verbraucht], '#0,## Tage') as [Anspruch abzüglich Verbraucht],

    Num#([Anspruch abzüglich Genehmigt], '#0,## Tage') as [Anspruch abzüglich Genehmigt],

    Num#([Anspruch abzüglich Geplant], '#0,## Tage') as [Anspruch abzüglich Geplant]

FROM [http://community.qlik.com/servlet/JiveServlet/download/646202-135117/Resturlaub.xlsx] (ooxml, embedded labels, table is Sheet1);

This way you will keep the format of your excel source and still get numerical values to calculate with:

QlikCommunity_Message_140331_Pic1.JPG.jpg

QlikCommunity_Message_140331_Pic2.JPG.jpg

QlikCommunity_Message_140331_Pic3.JPG.jpg

hope this helps

Gruß

Marco

P.S.: Versuche bitte, Deine Fragen auf englisch zu posten, um mehr antworten zu erhalten und den anderen Forumsteilnehmern das Mitlesen zu ermöglichen. Auf deutsch könntest Du Deine Fragen z.B. in der German User Group - Deutsche User Group stellen. (Mit Anmeldung). Viel Spaß bei Deinem QlikView Praktikum, klingt nach einem interessanten Thema ...

View solution in original post

9 Replies
its_anandrjs

Hola,

Você pode fornecer quaisquer dados de exemplo ou você pode tentar com

Load

Left(DaysField,2) as New

From Location;

y se obtiene 17

saludos

Anand

Not applicable
Author

Danke für die Schnelle Antwort, ich habe die Excel Datei in Einem Anhang Veröffentlicht. Es sind anonymisierte Daten.

Justin

ashfaq_haseeb
Champion III
Champion III

Hallo,

Überprüfen Sie, ob das hilft.

LOAD [Vor- und Nachname],

     Konto,

     Kontingenttext,

     Beginn,

     Ende,

     AbtrBeg,

     AbtrEnde,

     Anspruch,

     Verbraucht,

     Genehmigt,

      SubField(Genehmigt,',',1) as Genehmigt_N,

     Ungenehmigt,

     SubField(Ungenehmigt,',',1) as Ungenehmigt_N,

     Geplant,

     SubField(Geplant,',',1) as Geplant_N,

     [Anspruch abzüglich Verbraucht],

      SubField([Anspruch abzüglich Verbraucht],',',1) as [Anspruch abzüglich Verbraucht_N],

     [Anspruch abzüglich Genehmigt],

     SubField([Anspruch abzüglich Genehmigt],',',1) as [Anspruch abzüglich Genehmigt_N],

     [Anspruch abzüglich Geplant],

      SubField([Anspruch abzüglich Geplant],',',1) as [Anspruch abzüglich Geplant_N]

FROM

Resturlaub.xlsx

(ooxml, embedded labels, table is Sheet1);

Schauen Sie sich hier beigefügten Dokument zu.

Grüße

Ashfaq

its_anandrjs

Hallo,

Sie können Ihren Tisch wie auf diese Weise für entfernen Sie unerwünschte charater aus den Tagen Felder durch den Einsatz von Purgechar und Funktionen ersetzen laden. Ich fügte hinzu, neue Felder für die Transformation.

LOAD [Vor- und Nachname],

     Konto,

     Kontingenttext,

     Beginn,

     Ende,

     AbtrBeg,

     AbtrEnde,

     Anspruch,

     Verbraucht,

     Genehmigt,

     PurgeChar(Replace(Genehmigt,',',':'),'Tage') as New_Genehmigt,

     Ungenehmigt,

     PurgeChar(Replace(Ungenehmigt,',',':'),'Tage') as New_Ungenehmigt,

     Geplant,

     PurgeChar(Replace(Geplant,',',':'),'Tage') as New_Geplant,

     [Anspruch abzüglich Verbraucht],

    PurgeChar(Replace([Anspruch abzüglich Verbraucht],',',':'),'Tage') as [New_Anspruch abzüglich Verbraucht],

     [Anspruch abzüglich Genehmigt],

    PurgeChar(Replace([Anspruch abzüglich Genehmigt],',',':'),'Tage') as [New_Anspruch abzüglich Genehmigt],

     [Anspruch abzüglich Geplant],

     PurgeChar(Replace([Anspruch abzüglich Geplant],',',':'),'Tage') as [New_Anspruch abzüglich Geplant]

FROM

Resturlaub.xlsx

(ooxml, embedded labels, table is Sheet1);

Grüße

Anand


MarcoWedel

Hallo Justin,

instead of a string extraction of the numerical part of your time fields, you could also use the num#() function to evaluate the string like this:

tabResturlaub:

LOAD [Vor- und Nachname],

    Konto,

    Kontingenttext,

    Beginn,

    Ende,

    AbtrBeg,

    AbtrEnde,

    Num#(Anspruch, '#0,## Tage') as Anspruch,

    Num#(Verbraucht, '#0,## Tage') as Verbraucht,

    Num#(Genehmigt, '#0,## Tage') as Genehmigt,

    Num#(Ungenehmigt, '#0,## Tage') as Ungenehmigt,

    Num#(Geplant, '#0,## Tage') as Geplant,

    Num#([Anspruch abzüglich Verbraucht], '#0,## Tage') as [Anspruch abzüglich Verbraucht],

    Num#([Anspruch abzüglich Genehmigt], '#0,## Tage') as [Anspruch abzüglich Genehmigt],

    Num#([Anspruch abzüglich Geplant], '#0,## Tage') as [Anspruch abzüglich Geplant]

FROM [http://community.qlik.com/servlet/JiveServlet/download/646202-135117/Resturlaub.xlsx] (ooxml, embedded labels, table is Sheet1);

This way you will keep the format of your excel source and still get numerical values to calculate with:

QlikCommunity_Message_140331_Pic1.JPG.jpg

QlikCommunity_Message_140331_Pic2.JPG.jpg

QlikCommunity_Message_140331_Pic3.JPG.jpg

hope this helps

Gruß

Marco

P.S.: Versuche bitte, Deine Fragen auf englisch zu posten, um mehr antworten zu erhalten und den anderen Forumsteilnehmern das Mitlesen zu ermöglichen. Auf deutsch könntest Du Deine Fragen z.B. in der German User Group - Deutsche User Group stellen. (Mit Anmeldung). Viel Spaß bei Deinem QlikView Praktikum, klingt nach einem interessanten Thema ...

MarcoWedel

Hi,

sollte eine der Antworten Deine Frage korrekt beantwortet haben, so markiere diese bitte als correct.

Danke

Gruß

Marco

its_anandrjs

Hallo,

Wenn Sie richtige Antwort aus der Post-Marke passende Antwort als richtig oder hilfreich bekam

Grüße

Anand

Not applicable
Author

Hallo Marco,

Danke für den Hinweis und Danke für deine Lösung hat mir wirklich sehr geholfen.

Justin

MarcoWedel

gern geschehen

Gruß

Marco