5 Replies Latest reply on Nov 7, 2016 8:25 AM by Marc MOUSSA

# (Visualization in Drop Down)

Hi,

Please assist me in the below two situations that I came across recently:

• ###### 1. Re: (Visualization in Drop Down) and Comparison of Current Week Sales vs Avg(Prior X week sales)

Hi,

Here's the solution for your first point. It uses LODs and a parameter to change the X last weeks.

Latest Week : { MAX(DATETRUNC('week', [date]))}

X Prior weeks : Integer parameter

Last weeks sales : SUM(IIF(DATEDIFF('week',[date],[Latest Week])=0 ,[total_sales],0))

Sales of last X weeks :

IF DATEDIFF('week',[date],[Latest Week])<=[X Prior weeks]

AND

DATEDIFF('week',[date],[Latest Week]) > 0

THEN [total_sales]

END

Average sales of last X weeks : AVG({ FIXED DATETRUNC('week',[date]) : SUM([Sales of last X weeks])})

% change last weeke to X prior weeks : [Last weeks sales]/[Average sales of last X weeks]-1

I can't understand easily the result for the second point.

Can you sketch it or be me more precise ? because you lention a lot of different fields different chart types.

The general idea of using multiple chart and letting the user choose which one to show is by using a parameter.

• ###### 2. Re: (Visualization in Drop Down) and Comparison of Current Week Sales vs Avg(Prior X week sales)

For 2016 data,

Basically, I am trying to show (One metric at a time) following thing:

a. Total visits

b. Registrations

c. Gross conversions

d. Trial starts

e. Total Sales

by viewing it either as the below type of visualization in a dropdown box.

a. Line Chart (By day),

b. Column Chart ( By Day) or

c. Crosstab (By Day)

• ###### 3. Re: (Visualization in Drop Down) and Comparison of Current Week Sales vs Avg(Prior X week sales)

Here's an example of how to do it.

Hope this helps.

• ###### 4. Re: (Visualization in Drop Down) and Comparison of Current Week Sales vs Avg(Prior X week sales)

Hey Marc,

I am not understanding this particular mutliple charts twbx file. There is a parameter that have different chart types. How did it appear on the filter shelf? Also for every measure, do I need to calculate three sheets pertaining to three charts? How does Chart gets filtered on the Dashboard after a parameter is created?

-- Udit

• ###### 5. Re: (Visualization in Drop Down) and Comparison of Current Week Sales vs Avg(Prior X week sales)

As you want to display 3 types of charts, 2 graphical and one crosstab, one sheet per metric.

So there are 3 sheets per metric. The parameter has 3 value :

- 1 : Bar chart

- 2 : Line chart

- 3 : cross tab

for instance on the bar chart sheet, the filter shelf there a filtre on the following formula : [Paramter] = 1, with the value TRUE.

The you choose the second value in the parameter and do the same : [Paramter] = 2, with the value TRUE.

You hide the title of the second and third sheets.

And at last, on the dashboard, you choose one of the sheets then you display the parameter.

For all of this to work you must stack three in a vertical continaire.

Hope this helps,

Marc