Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

urgent requirement

what I want is a dynamic variable to compare previous month to 12 months data,

and also if I make any selections in the list box so my text objects shud be updated,

current month:user selection

how to do that

10 Replies
Anil_Babu_Samineni

That is how default Variable can do? What is the issue you are facing?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

how to create that variable

Anil_Babu_Samineni

Perhaps this?

LET Var = Sum({<Month = {">=$(=AddMonths(Max(Month),-1))<=$(=AddMonths(Max(Month),12))"}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

it shud be treated as a ratio:

like current data view(with latest date data):user selection

I have a datefield in format dd/mm/yyyy

Anonymous
Not applicable
Author

kindly help as its a urgent requirement .

Anonymous
Not applicable
Author

count({<datefield={'$(variable1)'},field2-={'value'}>}distinct id)

variable1=addmonths(datefield,-12)

why its not wrking.

Anonymous
Not applicable
Author

it shub be last year data -current one

suppose the current is 1stfeb2018

1stfeb2018-1stfeb2017

how to create this type of variable

Anonymous
Not applicable
Author

thanks anil,

my requirement is by default the view shud be of last year ,

but if a user made any selection,so this shud change accordingly,

basically I have done like below

count({<date={'$(vriable1)'}>}distinct field)
-
count({<date={'$(vriable2)'}+ {'$(variable3)'} >}distinct field)

here variable1:captures my max date

variable2:last year date

variable3:user selected date from list box

but its just giving me frst output

in case of second the difrnce is not correct ,I thought of putting OR condition with a + sign ,its  not wrking as desired?

Anil_Babu_Samineni

I know where you made mistake, Will you able to provide application. Perhaps this?

count({<date={'$(variable2)'}>+ <{'$(variable3)'} >}distinct field)


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful