Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
paulosrl
Contributor III
Contributor III

HELP WITH BAR GRAPH

Hi all,

I need a bar graph that show total of NATUREZA_LANCAMENTO in one bar and a second bar a value choice in the list DESCRICAO_LANCAMENTO.

I have other issue, my graph has two dimensions (YEAR X MONTH), when a click in YEAR i cant put the month name i x-line.

The project and the data are attached here.

Thanks for help.

The grahp tha i need is something like the picture.

The blue bar is sum of NATUREZA_LANCAMENTO = 'C'

The red bar is sum of choice in the list DESCRICAO_LANCAMENTO like for exemple 'LANCAMENTO 1'

The fix bar will be ever => sum of NATUREZA_LANCAMENTO = 'C', the dinamic bar will be the choice in the list DESCRICAO_LANCAMENTO. 🙂

Thanks for help!!!

Graph.jpg

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Use this two expressions. And the red will display only when you select a value in DESCRICAO field.

Dim: MES&'-'&ANO

expr1: Sum({< NATUREZA_LANCAMENTO = {'C'}, DESCRICAO_LANCAMENTO =  >} VALOR_TRANSACAO)

expr2:

= Sum({< DESCRICAO_LANCAMENTO = {'$(=GetFieldSelections(DESCRICAO_LANCAMENTO))'}, NATUREZA_LANCAMENTO = {'C'} >} VALOR_TRANSACAO)

View solution in original post

7 Replies
vishsaggi
Champion III
Champion III

May be this? Check the expressions? Will they be Sum or Count? Change accordingly.

paulosrl
Contributor III
Contributor III
Author

Hi Vishwarath, almost perfect, I've made some modifications, to use a Dinamic List for draw the graph, but, isnt ok.

I was using:


Sum({< DESCRICAO_LANCAMENTO = {'LANCAMENTO 1'},  NATUREZA_LANCAMENTO= {'C'}>} VALOR_TRANSACAO)

To get a static value

I'm trying made a dinamic select using list with the field <DESCRICAO_LANCAMENTO>

I'm trying this, but the graph doesnt show de select value on list:

Sum({< DESCRICAO_LANCAMENTO = {$(=selecaoGrafico)},  NATUREZA_LANCAMENTO= {'C'}>} VALOR_TRANSACAO)

This is my only issue now...

Thanks

The new version is attached..

vishsaggi
Champion III
Champion III

When you select Month and Year what the values to be displayed in your bar graph for Blue bar and Red bar for one selection LACAMENTO 1?

Can you give me what figures should be plotted for Blue bar and Red bar? Cos for me both are coming as same value.

vishsaggi
Champion III
Champion III

Check this attached ? You dont need any specific variable to get current selections i believe here? Let me know if this is what you are looking for ?

paulosrl
Contributor III
Contributor III
Author

Hi Vishwarath,

The qvw doesnt work yet,

Let me show you what I Need:

When I use the expressions in the picture:

1.JPG

and

2.JPG

The result is correct, like the screens, for 2013, 2014 and 2015:

2013

2013.JPG

2014

2014.JPG

2015

2015.JPG

Your last version, doesnt calcute the correct values. The correct values are on the screens (2013, 2014 and 2015) .

If I try use set analysis to calculate dinamic, based on selected value on list box, like as: LANCAMENTO1, 2,3, ...

The graph doesnt show the red column (Lancamento Escolhido)

This is the main problem. I've tryed a lot of test using set analysis, but nothing is fix the problem..

😞

!

Thanks again.

I've attached the Version 3 of qvw.

vishsaggi
Champion III
Champion III

Use this two expressions. And the red will display only when you select a value in DESCRICAO field.

Dim: MES&'-'&ANO

expr1: Sum({< NATUREZA_LANCAMENTO = {'C'}, DESCRICAO_LANCAMENTO =  >} VALOR_TRANSACAO)

expr2:

= Sum({< DESCRICAO_LANCAMENTO = {'$(=GetFieldSelections(DESCRICAO_LANCAMENTO))'}, NATUREZA_LANCAMENTO = {'C'} >} VALOR_TRANSACAO)

paulosrl
Contributor III
Contributor III
Author

It's works!!! Thanks guy!!!! I will test in hard mode now !!!!

Thanks!!!