Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
YoussefBelloum
Champion
Champion

Remove bars with values higher or lower than

Hi guys, hope you're doing well !

Please find below a data sample 

année trimestre chiffre
2017 T4 100
2017 T3 300
2017 T2 500
2017 T1 800
2018 T1 150
2018 T2 350
2018 T3 900
2018 T4 1000
2019 T1 500
2019 T4 710
2019 T3 760
2019 T2 990

Example: I'm trying to get a barchart for the amounts >= 800 and remove the blank spaces corresponding to the rest of the quarters, the result I need is the 2nd barchart below (I did it with paint)

barchar.png

Dimensions are : année, trimestre

Measure: sum({<chiffre={">=800"}>}chiffre)

I can't make it work with a set analysis or If on the dimensions...

Can you please take a look ?

Thank you

Youssef

Labels (3)
1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion
Author

It seems that what I want to acheive it can't be done on a barchart with two dimensions, some members asked the same question, still not been solved.

The solution that I find is to replace my two dimensions (quarter and year) with only one "Quarter-Year" dimension. it works now.

If a solution exists, I'll be happy to see you share it here

Thank you all.

View solution in original post

8 Replies
edwin
Master II
Master II

Hi, your expression is actually correct

edwin_0-1601316243119.png

the reason you have spaces in between the years is you are missing data for trimester.  how did you want it to render?

YoussefBelloum
Champion
Champion
Author

Yes, data is missing because it is not corresponding to the condition on my set analysis.

like I said, i want it to render like my second barchart, on the image attached on the post.

thanks

edwin
Master II
Master II

if you use GROUPED as your style, QV will ALWAYS render a space for a dimension with 0 value.

if you select STACKED then anything that is 0 will not render:

edwin_0-1601326143131.png

 

YoussefBelloum
Champion
Champion
Author

I need to keep the barchart style normal, every quarter of every year on a distinct bar. Is there a back end or front end solution to get the chart that I poster above ?

 

YoussefBelloum
Champion
Champion
Author

@sunny_talwar @kaushiknsolanki @Kushal_Chawda 

would you be able to take a look please ?

Taoufiq_Zarra

@YoussefBelloum   I don't think that's possible, you can check this discussion.

 

 

mais sinon si 800 est toujours fixe je pense qu'au niveau du load script tu peux créer une autre table dont il figure que les trimestres et année avec sum(..) >800 !

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
YoussefBelloum
Champion
Champion
Author

It seems that what I want to acheive it can't be done on a barchart with two dimensions, some members asked the same question, still not been solved.

The solution that I find is to replace my two dimensions (quarter and year) with only one "Quarter-Year" dimension. it works now.

If a solution exists, I'll be happy to see you share it here

Thank you all.

YoussefBelloum
Champion
Champion
Author

Hi @Taoufiq_Zarra 

concatenating a new portion to my table filtering on amount greater or less, can be a solution. unfortunately it is not the best suited to my data-model and to the graphics tabs that are already developed.

Like I said below, the front-end solution was to concatenate fields year and quarter into one dimension.

 

Youssef