Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a bar chart with montly values that I need to add, in the end of it, the cumulative sum of the entire year. This must be filter sensitive so I can see the entire database or just the years I filter. Since my Dimension is labeled "Mensal" and my Measure is labeled "Orçado", I used this chart level script:
Let vTotal = 0;
Let P = HCNoRows();
For J = 1 to P
Let vTotal = vTotal + HCValue(Orçado,J);
Next
Add Load 'Total' as "Mensal", $(vTotal) as Orçado Autogenerate 1;
The following error occur:
"Load statement could not find target column [1268] in hypercube"
If I change to "$(vTotal)" to "Floor($(vTotal))", the error disappears but the bar chart creates a empty bar.
What am I doing wrong? Here's some background info that might help:
Database:
Data Load Editor:
[MENSAL]:
LOAD
"Ano2", //Contains the year of the data. More specifically 2023 and 2024;
"Mês2", //Contains the month of the data in number. For exemple, January would be 1. Contains all months of 2023 and only Jan2024 (13 Rows);
"Mês.Ext", //Contains the month of the data by name. This is the Dimension I used in the bar chart;
"Qua.2", //Contains the quarter of the data, beeing "T1", "T2", "T3" and "T4" ("T" is the equivalent of "Q" in Portuguese);
"Sem.2", //Contains the quarter of the data, beeing "S1" and "S2";
"Orçado TOTAL (USD)" //Data used as Measure. The "Orçado" Measure is the formula "Sum([Orçado TOTAL (USD)])".
FROM [lib://Drive Pessoal Rafael Ratier/13 - GPCP Qlik/Base de Dados Qlik.xlsx]
(ooxml, embedded labels, table is MENSAL);