Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
NiTo
Creator
Creator

Set Analysis

Hi All,

Trying to figure it out but failed. Hoping to get some help here.

Expression that I am using: Sum({<OrderMonthYear>}distinct(ProdId))

OrderMonthYear is a field which gives me Month in format: June-2008, August-2010 etc. ProdId  is another field.

Thing is Bar chart is correct but, I Am getting multiple values of same month in the chart. For eg, 2 bars of Aug 2009 with different value, 3 bars of Sept-2010 with different value.

I want to group all the months from the same year showing me the Sum of Distinct Prodid..

 

 

 

 

NiTo_0-1680615349479.png

As, it is clear from the chart that multiple bar of the same month are appearing. For eg, Aug 2008, Nov 2008 ,Sep 2008..

Thanks

Labels (4)
15 Replies
BrunPierre
Partner - Master II
Partner - Master II

This?

Sum(Aggr(Sum({<OrderMonthYear>} DISTINCT ProdId), OrderMonthYear ))

NiTo
Creator
Creator
Author

Thanks for you reply Brun..Sadly, no change to the chart...

 

NiTo_0-1680614832229.png

As you can see, multie bar of same month still appear

Or
MVP
MVP

Why are you using {<OrderMonthYear>} if this is your dimension? It seems like you just need a regular sum without the set.

NiTo
Creator
Creator
Author

Yes, it is a dimension and with a regular sum without set, the result is same...

Or
MVP
MVP

Is the table ProdID comes from properly connected to the one OrderMonthYear is from? This result suggests they may not be connected in which case the aggregation will not work correctly since it can't assign ProdIDs to months.

NiTo
Creator
Creator
Author

Yes, Or. Both the fields are from the same Table.

 

NiTo_0-1680619132064.png

 

anat
Master
Master

Use date# to convert into MMM-YYYY Format

NiTo
Creator
Creator
Author

Order Date is converted into OrderMonthYear into MM-YYYY format...

NiTo
Creator
Creator
Author

Date(OrderDate, 'MMM-YYYY') as OrderMonthYear