on 01-10-2015 7:38 PM
Hi Experts,
I have a data like below,
Name | Month | Amount |
xxx | 6 | 20000 |
yyy | 7 | 3000 |
zzz | 9 | 400 |
aaa | 5 | 10000 |
aaa | 4 | 3200 |
ccc | 5 | 100 |
In prompt, we need to give Month. If user enter month then report should show below details. For example, if user selecting month as 5
Expected Result
Month =5 | ||
Name | Current Month | Previous Month |
aaaa | 10000 | 3200 |
ccc | 100 | 0 |
I need to get name, current month(user selected Month) & Previous Month (5-1). I used < operator in prompt to get previous month data.
In report for previous month column, i used below formula
Previous month = amount where (Month=userresponse("Month:")-1). But am not getting above result. I am getting like below
Available Result
Name | Current Month | Previous Month |
---|---|---|
aaaa | 10000 | |
3200 | ||
ccc | 100 |
How to get both the values in same row ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create variable for previous month = userresponse("Month:")-1
and new variable for amount= amount in (previous month;name) name is aaa,ccc.
Regards,
Rathish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Name | Current Month | Previous Month |
---|---|---|
aaa | 10000 | 3200 |
3200 |
I tried but am not getting expected answer. I got above answer. I need to apply one more logic that, if user entering month 1 and current year then it has to show previous year 12th month value.
Variables -
Selected Month - ToNumber(UserResponse("Enter values for Month:"))
Amount_Previous Month = Amount Where (If [Selected Month]=1 Then [Month]=12 Else [Month]=[Selected Month]-1 And If [Selected Month]=1 Then [Year]=[Previous Year] Else [Year]=[select year])
I need to remove the second row, could you please help on this?
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.