Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
How would I use the inmonth or inquarter function within the data load editor to flag patients that came in to our hospitals. I use them regularly in set analysis but I can't figure out how to do the same function with an if() statement to create a yes or no flag. Here's an example of my set analysis. In this case I'm getting total visits from two months prior than my variable date. Is there a better way to do this than the inmonth or inquarter functions? I need it all to be dynamic based on the date that's being pulled in from vCurrentDateCutoff.
sum({<AdmitDate={"=inmonth(AdmitDate,Date(vCurrentDateCutoff, 'M/D/YY'),-2)='-1'"}>}Visits)
I also need to create a single dimension that has various date ranges to replicate our general ledger. Example would be that I need to put a dimension in a pivot table that would give me the last four quarters and last six months broken out individually. What is the best way to do this?
Thanks for your help!
I would expect this to work in a load script:
Load
AdmitDate,
If(inmonth(AdmitDate,Date(vCurrentDateCutoff, 'M/D/YY'),-2), 'yes', 'no') as Flag2monthsago
...
I would expect this to work in a load script:
Load
AdmitDate,
If(inmonth(AdmitDate,Date(vCurrentDateCutoff, 'M/D/YY'),-2), 'yes', 'no') as Flag2monthsago
...
Thank you this worked. I thought I had tried this but must have missed something the first time. I did have to make a small change to the variable to get it to work properly '$(vCurrentDateCutoff)'.
Thanks for your help!
Matt