Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
car3489
Contributor II
Contributor II

Alternative State on Y-Axis in Distribution Chart

Hello,

I am trying to have 2 alternative states to be plotted similarly to how a bar chart does with 2 calculated measures using the set expressions i.e. Avg({[Sample-A]}[x]). What i am looking to do is have Sample-A & Sample-B on the Y-axis (Chart rotated) if that is at all possible?

My thinking would be a Dimension simply with "A" and "B" for example if the field is in either of the states but i am not sure how to proceed.

Thanks

1 Solution

Accepted Solutions
BenjaminT
Partner - Creator
Partner - Creator

Hi,

You could create a dummy dimension 'sample' in your data load with values 'A' and 'B' and use this as the dimension for the distribution chart.

Then use an if statement such as this one in the measure: 

=if(only(sample) = 'A', Avg({[Sample-A]} x), Avg({[Sample-B]} x))

Does that help?

Ben

View solution in original post

2 Replies
BenjaminT
Partner - Creator
Partner - Creator

Hi,

You could create a dummy dimension 'sample' in your data load with values 'A' and 'B' and use this as the dimension for the distribution chart.

Then use an if statement such as this one in the measure: 

=if(only(sample) = 'A', Avg({[Sample-A]} x), Avg({[Sample-B]} x))

Does that help?

Ben

car3489
Contributor II
Contributor II
Author

That works great thank you!

I am hoping to reuse it in a T-test as well but have not tried it yet.