Skip to main content
The way to achieve your own success is the willingness to help somebody else. Go for it!
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Creating a hypothesis testing

Good morning guys.

I'm studying some airlines behaviour and I would like to create a "hypothesis test".
In my DataBase I have some fields where four of them are: KEY, ORIGIN and DESTINATION.

Something like this:

... ......


So, my question is:
Is there any way to let the user to replace the ORIGIN and DESTINATION of flights?

Example: Replace all ORIGINS and ARRIVALS of the airline ABC from VCP to GRU.

I'm counting the number of DISTINCT ROUTES (ORIGIN & " - " & DESTINATION) per airline.  And basically, each airline is operating on its own hub, and they are all really close. So, what if they were all the same airport. How many distinct routes each airline would be operating in this case? 

Is there any way to let the user to replace and test it? Or I'll have to do it via LOAD SCRIPT?

Thanks guys

4 Replies

if you are allowing the user to select an Airline and then let the user override the origin and/or destination, maybe a simple way would be just ignore the original and/or destination - whatever the user selects.

for example airline A has 4 flights, the original and destination can be different.  now the user selects a specific origin.  if i understand the ask you want all origins to be replaced by the chosen origin and then count the flights.  so regardless of what the new origin is the number of flights would not change so just count the flights.  you can still count distinct destinations.  now the problem is when the origin and destination are both changed - there will always only be one distinct count.  is there a business requirement that isnt specified that i am missing?

Creator II
Creator II

Hello Mr. @edwin , how are you?

Yep, that makes sense!
Thanks for shareing your knowledge...



Creator II
Creator II

Take a look at this chart



This chart is showing the number of routes with competitors and with no competitors per airline.

The dimension I'm using is: NCIA (the airline name)

And the expressions I'm using are:
Routes with competitors: 
count(DISTINCT ROTA) - count({<ROTA = {"=count(DISTINCT NCIA)=1"}>} DISTINCT ROTA)

Routes with no competitors:
count({<ROTA = {"=count(DISTINCT NCIA)=1"}>} DISTINCT ROTA)
Where ROTA is the route

So, in this chart the user can select an airline for specific analysis... but no matter where he clicks (at the dark or at the light section of the bar), the system will always show the info about the selected company.

Is it possible to filter by the users side (dark or light) selection?
I mean, if he selected the dark side of LAN bar, I would like to see the info about the routes LAN performed WITH COMPETITORS, and not all routes LAN performed (with and without competitors).

Is it possible to be done?


you can only filter using dimensions.  one thing you can do is create a dimension for COMPETITION, it can be in an island table, not connected to any of your tables.  in your expression, do an if COMPETITION='WITH COMPETITION' then use the expression for with competitors, and also for the other NO COMPETITION.  this way you will be able to know what was chosen.  you can add a trigger to the new field to do what you want to do - either enable a new chart or enable an expression.