Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
saivina2920
Creator
Creator

How to add number (variable) along with two different dates in count expression

How to add number (variable) along with two different dates in count expression.

number variable is dynamic value. it may be 1 to 100 (i.e) 1 to 100 days.

vVariableDays ==> 1 to 100 (days)

if user enter some values, for example "20" then it will add from >=vCalDate  & <=vToday + 20 days.

below is my count expression.

=Count({<EmpJoinDate = {"$(='>=' & vCalDate & '<=' & vToday) & '+' & vVariableDays"}>}EmpJoinDate)

The above expression will not give proper count. 

How to convert number to days along with two different dates in count expression...?

 

Labels (2)
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I would pull out the calculated date into another variable, just so I could see better what was going on, then use;

Count({<EmpJoinDate = {">=$(=vCalDate)<=$(=vEndDate)"}>}EmpJoinDate)

Which looks like it works;

20190523_1.png

Cheers,

Chris.

View solution in original post

3 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I would pull out the calculated date into another variable, just so I could see better what was going on, then use;

Count({<EmpJoinDate = {">=$(=vCalDate)<=$(=vEndDate)"}>}EmpJoinDate)

Which looks like it works;

20190523_1.png

Cheers,

Chris.

saivina2920
Creator
Creator
Author

can you pls. share the .qvw files for reference...?

I am using variables in two places. 

1. TextBox and 2. Pie Chart.

1. In the text box, It will show only year, not exact count ==> not working

2. In the Pie chart, i already define the two days. along with i want to pass the variables. (variable already formatted as you given).

How to solve this..?

Herewith i have attached with formula with corresponding fields screenshot and .qvw Files

chrismarlow
Specialist II
Specialist II

Hi,

I only have personal edition so I can't open your QVW.

Looking at your screenshots

1) In the text box you don't need $() around the variable - just put =vFinalCountDate

2) I don't understand what you want to show on the pie chart - the count of 2 equals the total on the chart just above - do you want to show # for each of the 2 days 22/5 & 23/5? In which case add NewDate as a dimension?

Cheers,

Chris.