these are my tables which I load in my script
(ooxml, embedded labels, table is Kategorien);
(ooxml, embedded labels, table is Zinsdaten);
([Payment (Asset) p. m.]/[Selling price])*100 as Leasingfaktor, //created field Leasingfaktor
Applymap('MAP_PV', Category) as avg_PV_for_Category,
Applymap('MAP_Zins',[Lease start date]) as Zins;
LOAD [Lease No] as Kaufschein,
Manufacturer as Hersteller,
Model as Anlagebezeichnung,
[Lease start date],
[Scheduled lease end date],
[Actual lease end],
[Cost centre (asset)] as Kostenstelle,
[Location of installation] as Standort,
[Payment (Asset) p. m.],
Leasinggeber as Region,
Technologie as Kategorie
(ooxml, embedded labels, table is Sheet1)
where [Payment (Asset) p. m.]>0;
let vAuswertungsdatum = today();
If(AvgLeasingfaktor>=1.5 and AvgLeasingfaktor < 2.0, '60 Monate',
If(AvgLeasingfaktor>=2.0 and AvgLeasingfaktor < 2.4, '48 Monate',
If(AvgLeasingfaktor >=2.4, '36 Monate','Festkontraktierte Verlängerung')))as Zuordnung;
Avg(Leasingfaktor) as AvgLeasingfaktor
Group By Category,Zins;
What I actually want to do is to operate serveral results of an expression. For example:
If I have two different charts with different results
sum([Selling price]) = 1000 = I call the expression "Investment" -> 1. Chart
avg_PV_for_Category*sum([Selling price]) = 10000 = I call the expression "PV Kosten" -> 2. Chart
What I'd like to do is
I know that I have to define those expression as variables.
So I have to go to: Settings/Variables
I put in the field "Value" sum([Selling price]) and give it the name "vInvestment"
analog avg_PV_Category*sum([Selling price]) and give it the name "vPVKosten"
Now I create a straight table and want to operate (sum,multiply, substract etc). But I dont really know the syntax of how to put them in an expression.
Nothing happens if i just add the expression vInvestment+vPVKosten
It returns me nothing.
So my questions are:
is the syntax correct if I define a new variable or do I have to add a "=" before the expression in the Valuefield?
-> =sum([Selling price]) -> vInvestment
what is the syntax to operate different expressions which are defined as variables?
-> vInvestment+vPVKosten ? (definetly this is the wrong syntax)
And is it possible to use variables in variables?
I defined my variable sum([Selling price]) as vInvestment
I'd like to redefine my variable vPVKosten to avg_PV_Category*vInvestment
here I used my variable which I defined before.
I m a beginner in QV it would be great if you exlpain or give me solutions as comprehensive as possible.