Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9369

Re: Need formula to show correct date range in Crosstab report

$
0
0

Hi Edmund,

 

Why don't you bundle the dates?

 

Here is one way you can do it.

 

This works because the numeric value of 201301 to 201312 will never be in the same numeric range of 201201 to 201212 and so on so forth.

 

I have 4 parameters

StartingYear - String

StartingPeriod - String

EndingYear - String

EndingPeriod- String

 

Create a formula:

 

BundledDates

tonumber(trim(toText({Command.YEAR},"####"))+replace(toText({Command.MONTH},"##")," ","0"))


In the record selection formula I entered:

{@BundledDates} in tonumber({?StartingYear}+if len({?StartingPeriod})=1 then "0" else ""+{?StartingPeriod})

    to tonumber({?EndingYear}+if len({?EndingPeriod})=1 then "0" else ""+{?EndingPeriod})


Viewing all articles
Browse latest Browse all 9369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>