BookmarkSubscribeRSS Feed
SatishR
Obsidian | Level 7

Dear Team,

 

I am trying to filter out the Yesterday's data from Audit table and I want to store in Historical manner in my permanent lib. However I am not getting any option to filter out data in dynamic way. I have attached screenshot for your reference.

 

SatishR_0-1734331579845.png

Any option to filter out data based on today()-1 features. Kindly assist me regarding the same.

Thanks in advance.

 

5 REPLIES 5
LinusH
Tourmaline | Level 20

I don't have Data Studio at my fingertips, and the docukentation is not really answering this specific need.

But your screen shot is from the Convert Column transform, please attach one with the Filter transform.

Data never sleeps
SatishR
Obsidian | Level 7

@LinusH  kindly find the below screenshot

SatishR_0-1734341930397.png

I think this can be achieve using custom code

LinusH
Tourmaline | Level 20

Ok, so the question is what kind of expressions are valid in the Value field.

I guess you can try your today()-1 or "&Sysdate"d-1.

Data never sleeps
SatishR
Obsidian | Level 7

@LinusH Using below custom code we can achieve the scenario

 

SatishR_0-1734344893393.png

This resolved the concern.

Thanks for your support.

Patrick
Opal | Level 21

@SatishR Instead of custom code you could also use the BETWEEN operator from your dropdown list to generate the following where expression:

datetime between intnx('dtday',datetime(),-1,'b') and intnx('dtday',datetime(),-1,'e')

 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Discussion stats
  • 5 replies
  • 906 views
  • 1 like
  • 3 in conversation