Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
the-null
Contributor III
Contributor III

Pivot table

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)

Labels (4)
2 Replies
Kushal_Chawda

@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]) 
marcus_sommer

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).