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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
sakamsureshbabu
Creator
Creator

selected values

in my  exp i need selected sum like

sum(total)

but total value based on  "bill type = B "

how can i get

20 Replies
MK_QSL
MVP
MVP

SUM({<[bill type] = {'B'}>}total)

Agis-Kalogiannis
Employee
Employee

Set Analysis is the syntax you are looking for Suresh

sum({$<[bill type] = {'B'}>}total)

its_anandrjs
Champion III
Champion III

You can write with if expression also i assume total is field here

SUM(if( [bill type] = 'B' , total ) )


Or


SUM( { < [bill type] = {'B'} >} total )

Regards

Anand

sakamsureshbabu
Creator
Creator
Author

hi

it is not work

(SUM({<BILLCATEGORYNAME = {'GOLD BILL'}>}BILLGROSSAMOUNT)/AmtFlag)

-

(SUM({<BILLCATEGORYNAME =  {'[GOLD BILL]'}>}BILLDISCOUNT)/AmtFlag)

this my exp is correct

sakamsureshbabu
Creator
Creator
Author

hi

it is not work

(SUM({<BILLCATEGORYNAME = {'GOLD BILL'}>}BILLGROSSAMOUNT)/AmtFlag)

-

(SUM({<BILLCATEGORYNAME =  {'[GOLD BILL]'}>}BILLDISCOUNT)/AmtFlag)

this my exp is correct

Agis-Kalogiannis
Employee
Employee

Hi Suresh

I see that you have some extra square brackets there on the second expression

Try the following:

(SUM({<BILLCATEGORYNAME = {'GOLD BILL'}>}BILLGROSSAMOUNT)/AmtFlag)

-

(SUM({<BILLCATEGORYNAME =  {'GOLD BILL'}>}BILLDISCOUNT)/AmtFlag)

You need to know though that Fieldnames and values are both case sensitive.

Agis

sakamsureshbabu
Creator
Creator
Author

thanks agis it is working

its_anandrjs
Champion III
Champion III

Hi,

In first expression you use 'GOLD BILL' but in second it is with [GOLD BILL] you have to take exactly same field string available in the BILLCATEGORYNAME then it will works


try to check this if it is GOLD BILL


(SUM({<BILLCATEGORYNAME = {'GOLD BILL'}>}BILLGROSSAMOUNT)/AmtFlag)

-

(SUM({<BILLCATEGORYNAME =  {'GOLD BILL'}>}BILLDISCOUNT)/AmtFlag)

Regards

Anand

sakamsureshbabu
Creator
Creator
Author

HI

my dimension  is ornament but i want show in pivot table with selected "brand"

condition is "BRAND=Y"

how can i show