Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two groups of peopIe under the field group. A and B
need to make a histogram in which I want the average blood pressure(filed BP) of people who belong to A and another histogram with the average blood pressure of people who belong to A.
How do I code this using set analysis?
Thank you
Hi Mallika.
I assume you are looking for the frequency of A people in different BP intervals and the same thing for B?
Please can you explain the scenario a bit more
Yes , I am looking for one histogram with BP levels of only A people and another histogram with BP levels of only B people.
How do I use set analyses to achieve this?
i tried : =({$<[Control]={'Control'}>}[ED DBP])
and =Avg({$<[Control]={'Control'}>}[ED DBP]) as well but didnt work
Hi .I think you may need an aggregate function. Are you able to post the qvw or qvf so I can try it on my side first?
Hi
Probably something like
AVG({<[Field Group]={'A'}>}[ED DBP])
AVG({<[Field Group]={'B'}>}[ED DBP])
I am not sure if i have the field names correct though.
Mark
Hi.
Try this...
Add this to your Table (In the load script):
// This will create a dual. This function will create buckets for us with an increment of 25 (just change 25 to whatever interval you'd like)
DUAL(FLOOR(BP, 25) & '<= BP <' & FLOOR(BP, 25)+25, FLOOR(BP, 25)/25) as ABC
Create a bar chart
Dimensions:
ABC
Expression:
Count({<Control={'A'}>} ABC)
It should sort automatically, But if not, then sort by ABC
Please note I haven't tested this. Let me know.
Thanks
Kingsley