I have a LASR table which contains columns as below
So i want to create calculated variables based on the comparision of values of Flg_1 for the 2 TranDate selected by the users for a particular ID (Something similar i can do with a merge using By variable as ID)
Currently i am doing it in SAS and loading the results back to LASR server, but i wish to have this dynamic based on the TranDate's that the user of the report select.
Let me know if there is any way to achive this requirement.
Formulas within a row (on a row by row basis) is accomplished within the VA Software ala 'Calculated Items'.
Formulas across rows (on a group by basis) is accomplished within the VA Software ala 'Aggregated Measures'.
An example output of 'Aggregated Measures' sort of based on your sample data is attached.
With that said, the "comparison of values" (as your worded it) possibilities is going to depend on what Aggregation functions the software provides (e.g. Min, Max, etc.) vs. the actual "comparison" you are hoping to accomplish. Documentation on Aggregations possible within VA can be found here (note ... this is from v7.3 but should still apply to your v7.1):
(and above applies to Visual Analytics Explorer as well as Designer/Reporter).
Otherwise, if you need to perform some complicated IF-THEN-ELSE statement as your "comparison of values", you may have to alternatively transpose the data (prior to VA Reporting) so there's multiple columns (to compare) for each record of the data. Then you would utilize 'Calculated Items' (and not 'Aggregated Measures'). For example ...
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.