Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Need below table with required conditions - Qlik Sense

Hi Guys

Need your help here. Please check below table.

   

Sr. NoMonthDMU NamesLocationABCDE
1AUGKeralaIndia10232235
2AUGDelhiIndia124525567
3AUGNoidaIndia2653
4AUGLucknowIndia643
5AUGDelhiIndia1367254
6AUGDelhiIndia6823
7AUGLucknowIndia146323
8AUGKeralaIndia177233598
9AUGNoidaIndia1933254
10AUGKeralaIndia203439

Through this table, i need below table

ProductAugBenchmark
A230
B330
C130
D230
E3

30

Here bench mark should be editable and dynamic and logic for getting the values below Month(AUG) is

lets take eg for A, so here '2' signifies the count of DMUs whose sum(A) is greater than benchmark.(Kerala and Noida)

Please help, and i don't have license as of now, so kindly help with the expressions and script as well.

17 Replies
shiveshsingh
Master
Master
Author

Please help stalwar1

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi Shivesh,

You can try these steps:

1.

Data:

Load

Sr_No,

DMU,

Location,

'A' as Product,

A as Value

from

[data file](qvd, xml, ooxml etc.. );

2. Concatenate(Data)

Data:

Load

Sr_No,

DMU,

Location,

'B' as Product,

B as Value

from

[data file](qvd, xml, ooxml etc.. );

Repeat this for B, C, D, E

3. Then you can store the benchmark value in a variable created in Qliksense, say v_benchmark

4. Then create a simple table, add the Product as dimension, count(aggr(Sum(Value)>$(v_benchmark),Product)) as your expression. Additonally you can use extensions to make the benchmark editable.

Also, you don't need a license to use Qliksense Desktop. Create a login account on Qlik.com, login and download the Qliksense desktop version.

shiveshsingh
Master
Master
Author

I need count(DMU) where SUM(A) > Benchmark..

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi Shivesh,

That is the use of the aggr() function in Qlikview/Qliksense. Because you need nested aggregation (calculation of count based on the sum) you need to use aggr.

shiveshsingh
Master
Master
Author

Please let me know the expression

shiveshsingh
Master
Master
Author

Can anyone help in this?

Anil_Babu_Samineni

Try this?

Count({<Benchmark = {"=Sum(A)>Sum(Benchmark)"}>} DMU)

Or

Count({<Benchmark = {"=Sum(A)>Benchmark"}>} DMU)


Or

Count(If(Sum(A)>=Benchmark, DMU))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shiveshsingh
Master
Master
Author

Thanks but this is not working,

I need these A, B,C,D,E in dimension ( Product..using crosstable)

and then count(DMU) where sum of values in A column is greater than 'Benchmark'.

something like this..

select count(DMU) where  (sum(Product) group by DMU) > Benchmark.

Product   Data

A               2 ( As sum of A for  kerala and Noida is greater than 30)

shiveshsingh
Master
Master
Author

Something like this.. for all the products,

count(Aggr(If(Product = 'A' and Sum(Values)>'30', DMU_NAMES),  DMU_NAMES))

please help in building expression for all the products.( as i have shown in the output table)