Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using a created dimension which reads:
=If(Match(konto, '76071', '76072', '76073', '76000', '76030', '76050', '75140', '75190', '76070', '76074', '76075', '76080' ), 'Prihodi od kupaca',
If(Match(konto, '71000', '71005', '71110', '70000'), 'Rashodi nabavne vrijednosti prodane robe',
If(Match(konto, '48041', '48090', '41992', '48020', '48030', '48000', '48050', '48530', '48040', '48110', '41020', '41080', '48031', '48042', '48051', '48081', '48033', '41540', '48010', '48060', '48061', '46491', '46492' ), 'Troškovi kupca'
)))
How can I calculate, within this or in any other way, the total sum of Prihodi od kupaca (Revenue from customers) minus Rashodi nabavne vrijednosti prodane robe (Cost of goods sold)
@the-null try below expression
=sum({<Konto ={'76071', '76072', '76073', '76000', '76030', '76050', '75140', '75190', '76070', '76074', '76075', '76080'}>}Revenue)
-
sum({<Konto ={'71000', '71005', '71110', '70000'}>}[Cost of good sold])
I suggest to do this already within the data-model and not within the UI - in general as well as with the overlapping ones which means the various partial and total sum areas. This kind of data-structure including the value-direction could be created per The As-Of Table - Qlik Community - 1466130 and the overall-expression may then look like: sum(Field * Direction).