Calculate Fields - Ignore Hidden - InfoPath Dev
in

InfoPath Dev

Calculate Fields - Ignore Hidden

Last post 05-27-2016 08:41 AM by dannylam4. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-23-2016 02:39 PM

    Calculate Fields - Ignore Hidden

    I have a Sharepoint Library where users submit a survey. The Library contains numbers and a submission date. I'm creating a report that queries the library and has rules that hides survey entries based on a "Date From" and a "Date To" field. The report then takes the data and calculates an average, but it averages the hidden tables as well. Is there any way to ignore the hidden fields? Or a different way to filter the data without using a Rule? Example: Date From: 2/1/2016 Date To: 2/20/2016 [Repeating Table] __________________ Date: 2/15/2016 Answer 1: 5 Answer 2: 10 Answer 3: 4 __________________ Date: 2/18/2016 Answer 1: 2 Answer 2: 1 Answer 3: 1 __________________ (Hidden) Date: 3/30/2016 Answer 1: 6 Answer 2: 6 Answer 3: 7 __________________ [Normal Table, Expected Result] Average Answer 1: 3.5 Answer 2: 5.5 Answer 3: 2.5 [Normal Table, Current Results] Average Answer 1: 4.3 Answer 2: 5.6 Answer 3: 4 Hopefully I explained that okay. Thanks!
  • 05-26-2016 03:36 PM In reply to

    Re: Calculate Fields - Ignore Hidden

    Hi - when you create your average and other calcs, you need to filter the data selection in the same way as your table is filtered so the hidden rows are excluded. Does that make sense?
    Hilary Stoupa

  • 05-27-2016 08:27 AM In reply to

    Re: Calculate Fields - Ignore Hidden

    Is there a way to do that in the value formula? I have the data filtered using a formatting rule "[Date From] [Date]" and the [Average Field] formula is just "avg(Answer1)". Can a filter condition be added to the formula like... avg(Answer1,where([Date From] [Date]))?


    (I also just realized that my formatting for my example in my previous post didn't stick so readding it here)

    Example: Date From: 2/1/2016 Date To: 2/20/2016
    [Repeating Table]
    __________________
    Date: 2/15/2016
    Answer 1: 5
    Answer 2: 10
    Answer 3: 4
    __________________
    Date: 2/18/2016
    Answer 1: 2
    Answer 2: 1
    Answer 3: 1
    __________________
    (Hidden) Date: 3/30/2016
    Answer 1: 6
    Answer 2: 6
    Answer 3: 7
    __________________
    [Normal Table, Expected Result]
    Average Answer 1: 3.5
    Average Answer 2: 5.5
    Average Answer 3: 2.5
    __________________
    [Normal Table, Current Results]
    Average Answer 1: 4.3
    Average Answer 2: 5.6
    Average Answer 3: 4
  • 05-27-2016 08:37 AM In reply to

    Re: Calculate Fields - Ignore Hidden

    Yeah, so in your formula where you selected Answer1, you should be able to click Filter Data and add the same filter you are using in your formatting. If you have trouble, you can attach your form under a reply in the Options tab & I'll try to give you a hand.
    Hilary Stoupa

  • 05-27-2016 08:41 AM In reply to

    Re: Calculate Fields - Ignore Hidden

    Ah! Awesome, I've never seen that option before. Thanks! I'll look into it more, but this looks like what I'm looking for.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.