cancel
Showing results for 
Search instead for 
Did you mean: 

Query browser - pass dynamic default value

Former Member
0 Kudos

Hi Gurus,

I am using query browser to connect to BEx query in my dashboard 4.0. I have one requirement where I want to access the data from query based on dynamic value. e.g. I want to display data for Week to date i.e. current week to yesterday (sunday - yesterday). same way for month to date (as current month is july, so from 1 july to 10 july). i have searched over the internet and found that I can't pass dynamic value from excel to query prompt selector. any pointers that how can I achieve this and what component should I use for this. I have requirement for Week to date, Month to date and year to date.

Thanks,

Rajwinder

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182541
Active Contributor
0 Kudos

Does this week to date, month to date & year to date works in Bex query, if so can you please provide us the screenshot of the query and input fields for the query ?

Former Member
0 Kudos

I don't have week to date, month to date & year to date available in query. these are values in my drop down. in query I only have, week, date, month and year.

saurabh_sonawane
Active Contributor
0 Kudos

Hi

this is possible with directly mapping the query prompt to the excel sheet and not using query prompt selector.

weekday==TEXT(DATE(YEAR(TODAY()),TEXT(EOMONTH(TODAY(),0),"mm"),WEEKDAY(TODAY(),                    1)),"mm/dd/yyyy")

today = =text(TODAY(),"mm/dd/yyyy")

month start date = =TEXT(EOMONTH(TODAY(),-1)+1,"mm/dd/yyyy")

year = =TEXT(CONCATENATE("01/01/",YEAR(TODAY())),"mm/dd/yyyy")

the above formula is for display to user

while mapping to the query prompt we have to change the formula

we have to use datevalue().before every function

weekday =datevalue(TEXT(DATE(YEAR(TODAY()),TEXT(EOMONTH(TODAY(),0),"mm"),WEEKDAY(TODAY(),                    1)),"mm/dd/yyyy")

today = datevalue(text(TODAY(),"mm/dd/yyyy"))

month = datevalue(TEXT(EOMONTH(TODAY(),-1)+1,"mm/dd/yyyy"))

year = datevalue(TEXT(CONCATENATE("01/01/",YEAR(TODAY())),"mm/dd/yyyy"))

saurabh_sonawane
Active Contributor
0 Kudos

are you still facing the issue ?????