Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Sum of Distinct Issue In Qlikview

Hi All,

I am having an expression like Sum(DISTINCT SalesPlanned.).

Showing data against Month. Every Month level it is matching, but it is not matching in summary level. Similar Value we need to show in Single KPI.

If we actually calculate all the values of Month level it should come as 279413.6.

Can anyone please suggest.

Please help.

Thanks,

Sarif

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Ok so my formula works, but I couldn't see your full field name 😉

=sum(aggr(sum(DISTINCT SalesPlanned),CstFiscalYearPeriodConcat))

View solution in original post

13 Replies
adamdavi3s
Master
Master

Why are you using sum distinct?

This will only sum distinct VALUES so if you have the same value in different months, this won't work.

To get the total this way you would need to use

sum(aggr(sum(DISTINCT SalesPlanned),CstFiscalYear))

mhmmd_srf
Creator II
Creator II
Author

Hi Adam,

I need to do this sum of distinct as we have two different Fact in different Granularity.

The above expression you mentioned is showing the same value.

But I need Overall sum as Actual Sum of all month level values.

Please help.

Thanks,

Sarif

PrashantSangle

Hi,

What is your current expression ???

and what are dimensions do you have in your chart???

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
mhmmd_srf
Creator II
Creator II
Author

Hello Prashant Sir,

I need to show sum(DISTINCT SalesPlanned) in singlr KPI.

In list I am able to do it now. I got an option Total Mode as Sum of Rows. But how to make this in single KPI?

Please help.

Check the last column in List.

Thanks,

Sarif

PrashantSangle

Hi,

What are difficulties you are facing when you are implementing Adms solutions.

If possible share your app??

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
mhmmd_srf
Creator II
Creator II
Author

Hello Prashant sir,

I am sharing my App.

My selection is Fiscal Year = 2017

Major Group = 006

and I need Text Object called Planned Sales should show 279413.6. Like last column in Table.

Please help.

Thanks,

Sarif

adamdavi3s
Master
Master

Ok so my formula works, but I couldn't see your full field name 😉

=sum(aggr(sum(DISTINCT SalesPlanned),CstFiscalYearPeriodConcat))

PrashantSangle

Hi,

I am getting below window.

Capture.PNG

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
adamdavi3s
Master
Master

Yeah there are a whole bunch of filters on you need to take off.

My formula was correct but I couldn't see the full field name in the table and its sods law that the field

CstFiscalYear also exists!