BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
dmen24
Calcite | Level 5

I need to calculate the number of days between today's date (Now operator) and another date (DOI)

 

I applied Treatas to the DOI and Treatas and DatePart for Now.   I created a variable (FLAG - Past year) based on subracting DOI from Now to get the number of days in between. 

 

Then these are the results. You will see the NOW variable in the list table has different values. It should be the same value.

The FLAG - Past year (1)  is the number of days between Now and DOI. The values are incorrect.

 

What's going wrong?  Suggestions please. 

 

dmen24_0-1721839542628.png

dmen24_1-1721839573858.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

Hello,

 

I tried to duplicate your issue and I got REALLY confused... until I realized that I was seeing aggregated values! 🙂

 

In the options for your list table, enable "Detail data" and your numbers should make sense again.


(ETA: +1 to what @TSBruce said)

Let us know if that helps,

Sam

View solution in original post

4 REPLIES 4
TSBruce
SAS Employee

I suspect your numeric measures are being aggregated in the table.  You may try setting the option on the table to display detail data so these values are not aggregated.  I am not sure what your end goal is here, but you could also change the aggregation type for NOW to be AVG instead of SUM and that should give you what you expect if the values are being aggregated.

Sam_SAS
SAS Employee

Hello,

 

I tried to duplicate your issue and I got REALLY confused... until I realized that I was seeing aggregated values! 🙂

 

In the options for your list table, enable "Detail data" and your numbers should make sense again.


(ETA: +1 to what @TSBruce said)

Let us know if that helps,

Sam

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 463 views
  • 1 like
  • 3 in conversation