Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Sush123
Contributor III
Contributor III

Set analysis comparison in the same table

Hi team,

I need help to write a set analysis with a Trend chart for the below scenario :

Need to create a bar chart to compare data between different dates and to count no of ids which were Old, New and Changed in each date. Old/New/Changed values need to be calculated on the flow if the Code is same or changed with respect to a date. Below is the example.

Id Date Name Code Flag
10 01-06-2021 A AU New
11 01-06-2021 B IN New
12 01-06-2021 C CN New
13 01-06-2021 D NZ New
12 08-06-2021 C CN Old
13 08-06-2021 D AG Changed
14 14-06-2021 E BP New
11 14-06-2021 B IP Changed
11 Replies
MarcoWedel

What would be the expected result given your sample data?

Sush123
Contributor III
Contributor III
Author

Th expected result would be a bar chart with 3 different measures ( count of ids which are old , new & Changed)with respect to each date. The comparison need to be done between the dates

Ksrinivasan
Specialist
Specialist

hi,

Altrnatestate  method use to view the comparison of ID's which is new, old, change with different date ranges.

MarcoWedel

which values would you expect?

Sush123
Contributor III
Contributor III
Author

Hi @MarcoWedel , the data should be as below. Hope this is clear .

Sush123_0-1638942999496.png

 

MarcoWedel

This seems to be the result of a stacked bar chart having dimensions Date and Flag as well as an expression like Count(Id).

Given the data structure you provided this seems to be standard behaviour and pretty straight forward.

Your screenshot suggests that you already have a QlikView bar chart like this that you want to implement in Qlik Sense, since you posted in the Sense forum, and that you can compare dimensions and expressions against.

What exactly is the issue you experience when creating this chart in Qlik Sense?

Sush123
Contributor III
Contributor III
Author

The expected values are given in the bar chart, it doesn't matter whether qlikview or qliksense . The issue is that the comparison need to be done between the dates on the fly based on IDs for which there is a change in the Code when compared. As I have already given the values for flag column in my above example,it looks easy .but I need to calculate count of Ids  for which there is a change in the Code(old,new, change) with different dates.

Ksrinivasan
Specialist
Specialist

hi,

let me show your expected result from your data. confirm and revert.

Ksrinivasan_0-1639018364511.png

 

Sush123
Contributor III
Contributor III
Author

Hi @Ksrinivasan , expected result is the first table . In my above data , flag column need to be calculated if there is any change in the code. But i have added it already just to understand the data.