Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MarioCenteno
Creator III
Creator III

Sum if multiple Qlik Sense

I have the challenge, I have a field called "TIPOMEDICION" that has two values ​​"official" and "backup", I am using the dimension called "PUNTOSIMEC".


It turns out that I have data from the official pointsimec and backup, but sometimes I only have data from the official and not from the backup or vice versa, the challenge is that when there is data in the official pointsimec I add the data, but if there is data that adds me the data of the Puntosimec backup.


For this example I have two points loaded 40-4-81 & 40-82 but I do not have data from the official pointsimec of 40-4-82 but I need to add the data of the backup to complement.


I hope you have made me understand.


Current expression

SUM(If([TIPOMEDICION] ='OFFICIAL' AND [KWHR]>0,[KWHR]/1000))

simec.png

simec2.png

1 Solution

Accepted Solutions
sibin_jacob
Creator III
Creator III

Try this one in the expression


if(SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])>0,

SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])/1000,

SUM({<[TIPOMEDICION] ={'BACKUP' }>}[KWHR])/1000)

View solution in original post

4 Replies
bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

I am not sure if I understand entierly, but you want to add data from the official and if there is backup data you also want to add this?

Best,

Ali A

sibin_jacob
Creator III
Creator III

Try this one in the expression


if(SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])>0,

SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])/1000,

SUM({<[TIPOMEDICION] ={'BACKUP' }>}[KWHR])/1000)

sunny_talwar

You can also try this

RangeSum(

Sum({<PUNTOSIMEC = {"=SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])>0"}, [TIPOMEDICION] ={'OFFICIAL'}>} [KWHR]/1000),

Sum({<PUNTOSIMEC = {"=SUM({<[TIPOMEDICION] ={'OFFICIAL' }>}[KWHR])=0"}, [TIPOMEDICION] ={'BACKUP'}>} [KWHR]/1000))

MarioCenteno
Creator III
Creator III
Author

Thanks Sibin , it works.