Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
MB7
Contributor
Contributor

New Additonal filed

Dear All

 

I want to set an expression or to load data for below table two have additional field

 

Each day I'm importing data for several companies. For some companies we have in place insurance (Y). 

 

If company  A has two sales item in amount of 15 k eur and Insurance amount is 5000, I want to have field which shows me 10k eur as exceed insurance.

 

If company C has one sales item in amount of 50k and insurance amount is 70k,  I want to have field which shows me 0 eur as exceed insurance.

 

Your advice would be much aprreciated.

 

Matej 

Company Sales Insurance Insurance value
A 10000 Y 5000
B 15000 N 0
C 50000 Y 70000
D 70000 N 0
E 150000 Y 80000
A 5000 Y 5000
E 50000 Y 80000
       
       
      Exceed Insurance
For Company A result should be     10.000,00
For Company E result should be     120.000,00
For Company C result should be      0



Labels (1)
4 Replies
Or
MVP
MVP

RangeMax(Sales-Insurance,0) perhaps?

If you have 0 insurance (whereas opposed to null) when there is no insurance, you could instead use:

RangeMax(If(Insurance='Y',Sales-Insurance),0)

MB7
Contributor
Contributor
Author

It doesn't work.

 

MB7
Contributor
Contributor
Author

I found a solution that works fine in a table, where I have dimesion "Company".

Now I would like to show result in MULTI KPI, and of course if I don't have dimesion company it doesn't work.

 

If I add dimesion Company it's not readable . 

 

Is it possible to have in MUlti KPI dimension Company, which is hidden , so I can get only SUm of the companies, where sales exceeds insurance value.

 

thank you in advance

 

if(((Sum({<[Dan izpisa IOP] = {"$(=Max({<someMeasure = {'*'}>} "[Dan izpisa IOP]"))"},[Exclude sporne]={'Include'},Zavarovanje={'Da'}>}[Sales]) - [Insurance Value])>'0.00'),
(Sum({<[Dan izpisa IOP] = {"$(=Max({<someMeasure = {'*'}>} "[Dan izpisa IOP]"))"},[Exclude sporne]={'Include'},Zavarovanje={'Da'}>}[Sales]) - [Insurance Value]),'0.00')+
[Insurance Amount]

MB7
Contributor
Contributor
Author

I found a solution that works fine in a table, where I have dimesion "Company".

Now I would like to show result in MULTI KPI, and of course if I don't have dimesion company it doesn't work.

 

If I add dimesion Company it's not readable . 

 

Is it possible to have in MUlti KPI dimension Company, which is hidden , so I can get only SUm of the companies, where sales exceeds insurance value.

 

thank you in advance

 

if(((Sum({<[Dan izpisa IOP] = {"$(=Max({<someMeasure = {'*'}>} "[Dan izpisa IOP]"))"},[Exclude sporne]={'Include'},Zavarovanje={'Da'}>}[Sales]) - [Insurance Value])>'0.00'),
(Sum({<[Dan izpisa IOP] = {"$(=Max({<someMeasure = {'*'}>} "[Dan izpisa IOP]"))"},[Exclude sporne]={'Include'},Zavarovanje={'Da'}>}[Sales]) - [Insurance Value]),'0.00')+
[Insurance Amount]