How to pass a parameter to a WEBI doc
Today I would to share a way to pass a parameter to a WEBI document through a prompt..
Here´s the cenário :
I would like to display in a chart with data from e-fasion a threshold of [Sales Revenue] so that, if the sales are above that threshold, I could give na alert..
Let´s work wth a threshold of 6,000,000.
Here´s how my query looks like
And my Report
One can easily achieve it by setting na alarm on the column like
But what if this threshold value is dynamics so users wants to alter it whenever they need it. ?
This solution gets the user this ability by simply setting a prompt when refreshing the document.
To do so, I create a “dummy” query filter. What I call a “dummy” query filter is a filter that always evaluates true, independen of the value entered.
For the puspose of this example , I will create a “dummy” filter on State.
Here´s how it Works :
1 – Create a filter on State with a prompt
2 – In your report , create a measure variable [Threshold] = ToNumber(UserResponse(‘Threshold’);”00000″).
Since a string starting with a number character is always less than any string starting with a letter, the “dummy” filter will always evaluates, independent of the value enterered.
Running a query with a threshold value of 1500000
3 Set the alert to
And that´s it
Comments are mostrly welcome