Newbie function questions - InfoPath Dev
in

InfoPath Dev

Newbie function questions

Last post 02-23-2016 08:04 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-16-2016 01:22 AM

    Newbie function questions

    Hi! so i'm trying to calculate percentage between credit and debit. I managed to calculate it in excel (=(H26-G26)/ABS(H26)) but in infopath im completely lost. I tried some thing like this (Kredittotal - Debettotal) / (1 - (Kredittotal > 0) * 2) * Kredittotal. Also i'm having problems doing "progress bar". I'm trying to do a field which shows status as percent (in excel i did it like =(B8-TODAY())/(B8-B7)). B8 and b7 are dates. thanks!!
  • 02-22-2016 07:39 AM In reply to

    Re: Newbie function questions

     Do you mind attaching a copy of your form in a reply, under the Options tab, showing your current attempt?

    Hilary Stoupa

  • 02-23-2016 05:08 AM In reply to

    Added the form for inspection.
  • 02-23-2016 08:04 AM In reply to

    Re: Newbie function questions

     I think this will do what you need for the percentage: (Kredittotal - Debettotal) / ((1 - (Kredittotal < 0) * 2) * Kredittotal)

    You'll want to hide the field on the form if it contains "NaN" or "Infinity" - and you may want to set the data type to text to prevent validation errors. There is probably a fancy way to keep the formula from returning errors when Kredittotal is 0, but I am not very math-y. I'm not sure how to get a progress bar from dates. 

    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.