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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Duplicate values in bar Chart

Dear experts,

I am trying to create a bar chart with 2 dimensions, however I am ending up with duplicate values,

the expressions are as follows:

Bar chart .. Sum(cash)

line graph .. Sum({$<BDF_Type={"*profit*"}, YEAR = {'2015'} >} cash) / Sum({$<BDF_Type={"*revenue*"}, YEAR = {'2015'} >} cash)

I have attached screen shot for your reference.

Kind regards,

Royce

19 Replies
sdmech81
Specialist
Specialist

Hi,

Restrict ur dimension in Calculated dimension tab.

Sachin

Not applicable
Author

What if I want only the total fiscal years such as 2015/2016/2017 to be in the selection and not other date values ? I think I tried that option out and it gave me back values for every month as well

sdmech81
Specialist
Specialist

For Year u just say:

=Only({<Year={'2015'}>}Year)

Sachin

sasikanth
Master
Master

Please share a sample data set along with the requirement ,it would be easy to resolve .

sdmech81
Specialist
Specialist

Duplicates u r seeing bcs ur dimensions conatin that data and Qlikview is interpreting it correctly only.

Which all u don't want to see restrict in Calculated dimension bcs u gt 2 dimnesons, like as said above n try:)

sachin

Not applicable
Author

Sum({$<BDF_Type={"*profit*"}, Only({<Year={'2015'}>}Year) >} cash) / Sum({$<BDF_Type={"*revenue*"}, Only({<Year={'2015'}>}Year) >} cash)

is this what you mean ?

Not applicable
Author

or is the expression

Sum({$<BDF_Type={"*profit*"}, YEAR =Only({<Year={'2015'}>}Year) >} cash) / Sum({$<BDF_Type={"*revenue*"}, YEAR =Only({<Year={'2015'}>}Year) >} cash)

Not applicable
Author

heya Chanty do you know where to apply the only() function ? I have tried it inthe syntax and all, it does not work

Chanty4u
MVP
MVP

Try this

=Sum({$<BDF_Type={"*profit*"}, YEAR =Only({<Year={'2015'}>}Year) >} cash) / Sum({$<BDF_Type={"*revenue*"}, Only({$<Year={'2015'}>}Year) >} cash)

Not applicable
Author

thanks for helping out again buddy ! however I am getting an error in set modifier expression showing up