0

Year to date

Hi, this is what i would like to do (wasn't able to find somethin about "table self relation" in Ninox.

Let's say i have a table with this 3 fields: CustomerID, Year, Sales, all numbers fiels. So i could have

1 2017 1.000

1 2018 2.000

1 2019 3.000

2 2017 1.000

2 2018 1.500

2 2019 2.000 

etc, etc...

How can i display this year/last year Sales for every Client (calculate variations YTD will be the next step when i will be able to set the "this year" and "last year" variable values)

Thanks to everyone will help!

Daniele

6 replies

null
    • Ninox developer
    • Fabio
    • 5 yrs ago
    • Reported - view

    Ciao Daniele. Non so se ho capito bene, ho provato a crearti un modello: vedi se è quello di cui hai bisogno.

    Hello Daniel. I don't know if I understand correctly, I tried to create a model: see if that's what you asked.

     

    https://www.dropbox.com/s/0p7igyms6nim3zv/Daniele.ninox?dl=0

     

    Fabio

    • Daniele_Pogliani
    • 5 yrs ago
    • Reported - view

    Grazie Fabio per la risposta e l'esempio.

    Visto che sei italiano provo a spiegarmi meglio :-)

    Attualmente per elaborare i dati che mi servono esporto la tabella in excel e uso una pivot per fare ciò che in realtà vorrei riuscire a fare direttamente dentro ninox (ma come avrai inteso non sono un mago del db)

    Riferendomi al tuo esempio quello che cerco di fare è avere il risultato del fatturato YTD in una riga della tabella report

    In pratica, nella vista che vorrei ottenere (a parte i link dei campi che ho nelle varie tabelle che compongono questa specie di CRM handmade) mi servirebbe una cosa del genere:

    CLIENTE  ANNO FATTURATO_ANNO_CORRENTE FATTURATO_ANNO_PRECEDENTE

    per questo avevo pensato a un self join, dove per un valore di ANNO (uso un campo numerico, non estraggo con year()) nella tabella dublicata il link fosse a ANNO-1

    Scusami se non sono chiarissimo, l'unico db che ho usato prima di ninox è filemaker e li nella scheda relazioni si possono duplicare tabelle e creare self join

    Grazie ancora e scusa se ho scritto delle asinate, da autodidatta :-)

    Daniele

    • Ninox developer
    • Fabio
    • 5 yrs ago
    • Reported - view

    ITA: Ciao. Non è possibile aggiungere una riga su di una tabella che effettui un calcolo personalizzato, ma puoi aggiungere un "elemento di layout" di tipo "vista" che puoi manipolare a piacimento (esclusa la possibilità di utilizzare questa vista nel layout di stampa). Qua puoi vedere un esempio. Fammi sapere se si avvicina alle tue esigenze :).

    ENG: Hi Daniel. You cannot add a line to a table that performs a custom calculation, but you can add a "view layout element " that you can manipulate freely (excluding the ability to use this view in the print layout). Here you can see an example. Let me know if this approaches your needs :).

    https://www.dropbox.com/s/pxjwen6wsjmoov0/Daniele%20v.2.ninox?dl=0

     

    Fabio

    • Ninox developer
    • Fabio
    • 5 yrs ago
    • Reported - view

    ENG: P.S. It could be interesting to partecipate at Ninox Webinar EN today, played every Tuesday at 6:00 p.m. (Amsterdam, Berlin, Rome, Stockholm, Vienna zone) shown directly from Ninox team, for about 2 hours, where you can ask questions about all aspects of the program. :)

    ITA: P.S. Potrebbe interessarti il webinar di oggi, svolto tutti i martedì alle ore 18:00 in diretta direttamente dal team Ninox, per circa 2 ore, dove è possibile porre delle domande riguardo tutti gli aspetti del programma..

    https://zoom.us/webinar/register/WN_zoSk2qyNSz6vLRFF1zlakg

     

    Fabio

    • Daniele_Pogliani
    • 5 yrs ago
    • Reported - view

    This i exactly what i was looking for!

    thank you so much, Fabio

     

    Daniele

    • Ninox developer
    • Fabio
    • 5 yrs ago
    • Reported - view

    Thanks :)

     

    Fabio

Content aside

  • 5 yrs agoLast active
  • 6Replies
  • 2246Views