Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Swathi
Creator
Creator

i have a bar chart, i need to give symbols for my measures, iam using it is not working as expected

i have created a bar chart, i need to give symbols for my measures output. 

Stack formula is:

valuelist('Sales','Volume')

Bars :

Year

Measure:

if(valuelist('Sales','Volume')='cm2'
,(num(Sum(Sales)/sum(Volume),'#,##0 $/m3'))
,if(valuelist('Sales','Volume')='Volume'
,(num(Sum(Volume),'#,##0 m3'))
))

iam using above measure formula , i am getting output not symbols. i need 80 $/m3 like that getting only 80. 

and also i need to show only current and previous year of data, not all years in database. her showing showing all years, Kindly help to show only current and previous year of data (should interact with filter period)and get symbols for ouput.

Swathi_0-1704175972164.png

Please little urgent

 

Labels (2)
2 Replies
Parthiban
Creator
Creator

Hi,

Try this one

=if(valuelist('Sales','Volume')='Sales'
,(num(Sum({<Year={">=$(Prevyear)<=$(Maxyear)"}>}Sales)/sum({<Year={">=$(Prevyear)<=$(Maxyear)"}>}Volume),'#,##0'&' $/m3'))
,if(valuelist('Sales','Volume')='Volume'
,(num(Sum({<Year={">=$(Prevyear)<=$(Maxyear)"}>}Volume),'#,##0'&' m3'))
))

Variables:

Maxyear =  Max(tkt_Year)

Prevyear = Max(tkt_Year)-1

 

Anil_Babu_Samineni

Make sure you have this in your formatting,

Anil_Babu_Samineni_0-1704205627493.png

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful