Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Set Analysis in Calculation (Multiplication)

Hi,

I have a (for me) very tough Topic.

I want to calculate something but I dont get it to work. Maybe someone of you can help me

Now the Formular:

=TaxRate*[Act Year IFRSADJ]
(The  Calculation works but it calculate all entries, - even the ones with DefTaxCode = 'N/A')

Wish:

=TaxRate*[Act Year IFRSADJ] (ONLY If DefTaxCode <> 'N/A')

Thanks in advance.

Chris

11 Replies
Highlighted
Valued Contributor III

Re: Set Analysis in Calculation (Multiplication)

Hi Christian,

Can you try the below?

Only({<DefTaxCode = {"<>N/A"}>} TaxRate) * [Act Year IFRSADJ]

Hope this helps.

Highlighted

Re: Set Analysis in Calculation (Multiplication)

try

sum({<DefTaxCode -= {'N/A'}>}TaxRate* [Act Year IFRSADJ])

or

only({<DefTaxCode -= {'N/A'}>}TaxRate* [Act Year IFRSADJ])

Highlighted
Not applicable

Re: Set Analysis in Calculation (Multiplication)

Hi Sinan,

unfortunately it did not work.

But I now realised, that the Problem of the Formular is  [Act Year IFRSADJ]

I dont know why, but Qlikview does not calculate with a field (that is already calculated)

Maybe you have another idea 🙂

Chris

Highlighted
Not applicable

Re: Set Analysis in Calculation (Multiplication)

Hi Christian!

Just wanted to share a tool with you that has saved my life many times.

Qlik Set Analysis Wizard.

http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=

Hopefully it helps!

Will

Highlighted
Valued Contributor III

Re: Set Analysis in Calculation (Multiplication)

Can you post a sample data-set?

Highlighted

Re: Set Analysis in Calculation (Multiplication)

try like this:

if (DefTaxCode<>'N/A',TaxRate*[Act Year IFRSADJ])



Highlighted
Not applicable

Re: Set Analysis in Calculation (Multiplication)

I just get Zeros. Unfortunately it does not work.

Highlighted
Not applicable

Re: Set Analysis in Calculation (Multiplication)

Hi Avinash R,

I tried your idea and it worked partially.

As you can see, the second column is calculated.

Challenge Here:

Line 416 does not calculate --> that is correct

BUT: Line 417 did calculate the sum (it should be Zero as well)

I tried some things but nothing worked.

When everything works, Line 418 should Show the value -696.542,39 (That is my wish 😉

Here my calculation:

if(DefTaxCode <> 'N/A',-Unternehmenssteuersatz*[Akt. Jahr IFRSADJ],0)

Does somebody have an idea?

Thanks in advance

Chris

Highlighted
Valued Contributor III

Re: Set Analysis in Calculation (Multiplication)

Is [Akt. Jahr IFRSADJ] field a dimension or an expression?