LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Pivoting dates

    Employee
    Posted 02-08-2013 08:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    I have this anoying issue where i want to Pivot some dates to be Field names.
    However, Dates are not supported as field names, so i have to emit them as string.
    The problem is that the dates will be emitted in a strange order, with no obvious reason on why.

    I have attached an example, is there a solution to this problem?

    Pivoting.brg

    Edit: In this particular graph it seemed to work, but i know that if i add data this column will end not in the correct order.


  • 2.  RE: Pivoting dates

    Employee
    Posted 02-08-2013 12:07

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    I am not sure, but I think I understand what you are asking: Are you saying that the order of the field names in the .brd that comes out of the Pivot node are not in the order you prefer?

    If that is true, there could be a couple of reasons. However, first and foremost, I need to say that we don't really support an ordering of fields, in that order can definitely be changed in a number of ways depending on how various nodes interact with the data, and it isn't generally specified.

    That being said, it also could be your BrdViewer settings, which remembers ordering of columns as you request, as well. This just changes how data is rendered in the viewer. If you look in the help in BrdViewer, you might want to use one or both of the actions in the "Action" menu in the BrdViewer.

    Otherwise, there is no current easy way to specifically order your fields. I have made note of a request to create a node that could re-order fields based on patterns or lists, or other mechanisms...that might help you as well, once it is made available. Again, even with that node, the order could be changed by follow on nodes.

    Cheers
    Rich


  • 3.  RE: Pivoting dates

    Employee
    Posted 02-08-2013 13:15

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    The problem is that even though you are sorting by the date field before you pivot, there is a sort inside the pivot node that sorts the data by the value of {{^GroupBy^}} before the data is aggregated. So the fields are being output in order by the field Operation instead of by Dato. You will have to override the value in the sort that is inside the pivot node to {{^GroupBy^}}, Dato.reverse() to have the date fields output in a specific order.

    But Rich is correct about the ordering of fields. Even though they come out of the Pivot node in the order you expect it could change in the BRDViewer if columns are moved around or other fields are added or removed in later nodes.


  • 4.  RE: Pivoting dates

    Employee
    Posted 02-21-2013 00:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    Hi Guys.

    Yes, Rich, that is what i am asking, it would be nice to always have the newest date as a field to the left.

    Thank you for your answers.