duxbuse / ninthage-data-analytics

A better way for the project to ingest tournament results
GNU General Public License v3.0
1 stars 0 forks source link

casual games are handled in KPI and external performace page too. #118

Closed SanderND closed 2 years ago

SanderND commented 2 years ago

Casual games have no ranking on a tourney. Our combined metric is:

([Results (avg) per game per army (normalized)])([Z_weighting_ranking]/100) + avg([z_list_placing_average_per_army])((100-([Z_weighting_ranking]))/100)

As the 2nd part of the formula will return zero for casual games, the metric isnt correct. Therefore this formula should always do 100% * [Results (avg) per game per army (normalized)] in case the event type = casual.

SanderND commented 2 years ago

Formula as i think it should be:

IF([event_type]='CASUAL') THEN ([Results (avg) per game per army (normalized)]) ELSE ([Results (avg) per game per army (normalized)])x([Z_weighting_ranking]/100) + avg([z_list_placing_average_per_army])x((100-([Z_weighting_ranking]))/100) END

Error i get is the infamous cannot mix aggregrated and non aggregrated results in IF expression.

duxbuse commented 2 years ago

Is this sql or tableau specific code?

SanderND commented 2 years ago

It ia tableau specific. But heavily based on SQL. Here I build calculated fields based on other calculated fields. This keeps it simple and fast. But its a bit hard to follow what is done without looking in Tableau.

Op 27 mei 2022 om 10:50 heeft Sean @.***> het volgende geschreven:

 Is this sql or tableau specific code?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

SanderND commented 2 years ago

fixed! for CASUAL events now only the average is taken into account disregardless of the selection of the parameter setting by the user. This is good as casual games have only an average per game.