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: 
Not applicable

how to compare in qlikview?

Dear Experts,

              I would like to compare and show the comparison by bar chart.

In this table, I would like to get the maximum Balance holder by Male and by Female.

Best Regards,

Kyaw Myo Tun

1 Solution

Accepted Solutions
sunny_talwar

This?

Capture.PNG

Capture.PNG

Edit: Sorting is important here. Need to sort by expression in Descending Order: =If(vVar = 1, Sum({<Status = {'MALE'}>}Balance), Sum({<Status = {'FEMALE'}>}Balance))

Attaching the qvw for reference

View solution in original post

10 Replies
sunny_talwar

Try this in a straight table:

Dimension: Status

Expression: FirstSortedValue(Name, -Balance)

                  FirstSortedValue(Id, -Balance)

                  FirstSortedValue(Date, -Balance)

                  FirstSortedValue(Balance, -Balance)

sunny_talwar

This may be:

Capture.PNG

vardhancse
Specialist III
Specialist III

Hi,

Remove Status Dim from the table

Create 2 expressesion's:

1 with status=Male

2nd with status=Female

so that we can get the comparison between both Male & Female

Not applicable
Author

Dear Sunny T,

            I would like to show Max Balance to Min Balance one by one on bar chart.(For Male: AAM = 1800,MZA = 900,KKT= 500 will be showed from Max balance to Min balance).

I would like to show like this.Hope to help me.

Best Regards,

Kyaw Myo Tun

sunny_talwar

Alternatively, you can create a flag for the max in the script:

Table:

LOAD * Inline [

Date, Id, Name, Balance, Status

01/06/2015, 111, KKT, 500, MALE

01/06/2015, 112, AAM, 1200, FEMALE

02/06/2015, 113, ZZA, 1000, FEMALE

02/06/2015, 114, AUT, 1500, FEMALE

02/06/2015, 115, AAM, 1800, MALE

03/06/2015, 116, KYU, 2000, FEMALE

04/06/2015, 117, MZA, 900, MALE

];

Join(Table)

LOAD Status,

  Max(Balance) as Balance,

  1 as Flag

Resident Table

Group By Status;


Capture.PNG

sunny_talwar

This?

Capture.PNG

Capture.PNG

Edit: Sorting is important here. Need to sort by expression in Descending Order: =If(vVar = 1, Sum({<Status = {'MALE'}>}Balance), Sum({<Status = {'FEMALE'}>}Balance))

Attaching the qvw for reference

Not applicable
Author

Dear Sunny T,

        It work well at the moment and I also want to know how to build up "Switch" button for current qvw. It is better to explain from text pane because I am using personal edition. I hereby attached my qvw. Hope to help me.

Best Regards,

Kyaw Myo Tun

sunny_talwar

Hahahaha, unfortunately, I am also using a personal edition... so won't be able to see what you have in your qvw .

Would you be able to share the data and expected result? I might be able to walk you through the expected result.

Best,

Sunny

Not applicable
Author

Dear Sunny,

          haha, Thanks for your reply. It work correctly what I want to. I only want to know is how to build up to switch between Male & Female bar chart.

Best Regards,

Kyaw Myo Tun