Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Bar graph representation .?

Hi All ,

How can I represent the below data 

clipboard_image_0.png

 

in graphical representation like below- 

clipboard_image_2.png

sample model attached.

1 Solution

Accepted Solutions
Rohan
Specialist
Specialist

I have checked your app, & that's why I asked you to create this Flag Dimension in back end (Load Script). This way you can check what values the flag holds & then correct your "If" statement accordingly until you get the required result. I can't try out this part on my end because I don't have the valid connections. Also,when using "If" I would recommend the range to be defined as follows :

if(CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] <=250000, 'Claims up to R250 000',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >250000 and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID]<500000,'Claims > R250k and < R500k',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >500000 and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID]<1000000,'Claims > R500k and < R1m',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)' and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >1000000,'Claims > R1m'))))

Thanks & Regards 

Rohan S. Desai 

View solution in original post

9 Replies
Rohan
Specialist
Specialist

Hello,

Try taking "Claims by value band" field as a Dimension &  Sum of Motors & Sum of Non-Motors  as measure in  a normal Bar Graph. After that you can even personalize the presentation & colours as you wish in Appearance column in Bar Graph Properties.

Let me know if you have any queries.

Thanks & Regards.

Rohan S. Desai

suvechha_b
Creator III
Creator III
Author

Hi Rohan ,

"Claims by value band"  are measures. I am unable to take them as dimension.

Will you please help them by implementing them in my sample model.

Thanks,

Suvechha

Rohan
Specialist
Specialist

Ok, Try creating Flags of these Value Bands using "If" statement & use the Set analysis expressions as conditions in the "If". Then you can call these flags as dimensions in your bar graph.

Thanks  & Regards 

Rohan S. Desai

Rohan
Specialist
Specialist

For example, 

if([Partner Grouping Name]='Personal & Commercial'
and CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] <=250000, 'Claims greater than 250000',if(....)) as flag,

 

Try this & use this flag as a dimension in the graph.

Let me know if you have any queries.

Thanks & Regards 

Rohan S. Desai

suvechha_b
Creator III
Creator III
Author

Hi Rohan ,

I have defined the 

Flags in variable  see below image and used the variable in dimension. But my dimension is saying invalid dimension. Please kindly have a look on my sample model.

clipboard_image_0.png

Rohan
Specialist
Specialist

I have checked your app, & that's why I asked you to create this Flag Dimension in back end (Load Script). This way you can check what values the flag holds & then correct your "If" statement accordingly until you get the required result. I can't try out this part on my end because I don't have the valid connections. Also,when using "If" I would recommend the range to be defined as follows :

if(CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] <=250000, 'Claims up to R250 000',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >250000 and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID]<500000,'Claims > R250k and < R500k',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)'
and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >500000 and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID]<1000000,'Claims > R500k and < R1m',if( CLAIMS_CAPTURED_MONTH_NAME =' '>' & $(12Month)' and [EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >1000000,'Claims > R1m'))))

Thanks & Regards 

Rohan S. Desai 

suvechha_b
Creator III
Creator III
Author

Hi Rohan ,

I am getting a error -

The following error occurred:
Error in expression: ')' expected
 
but can't find the error -
 
My Script -
 
"FlagFields":
LOAD
CLAIMS_CAPTURED_MONTH_KEY,
if([EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] <=250000, 'Claims up to R250 000',
if([EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >250000<500000,'Claims > R250k and < R500k',
if([EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >500000<1000000,'Claims > R500k and < R1m',
if([EARLIEST_CLAIM_TOTAL_GROSS_CLAIMS_PAID] >1000000,'Claims > R1m') ) ) ) as FlagData
Resident
DWQMV_MONTH_CLAIM_CAPTURED;

left join (DWQMV_MONTH_CLAIM_CAPTURED)
Load
CLAIMS_CAPTURED_MONTH_KEY,
FlagData
Resident FlagFields;

drop Table FlagFields;
 
Please klindly have a look.
Rohan
Specialist
Specialist

Please correct the way you specify range in your "If" statement.

dashboard_sample.jpg

Thanks & Regards

Rohan S. Desai

suvechha_b
Creator III
Creator III
Author

Thanks Rohan. It worked.

Please can you have a look on my below link question.

https://community.qlik.com/t5/New-to-Qlik-Sense/Y-axis-not-working-according-my-requirement-please-k...