Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Creating a table from an Existing Table

I have a View from SQL Server database. It has fields like

Brand

Product

Sales

With the help of above table I need to create a field which will display the Sales range for each Brand (Not Product)

My Table should look like

Brand

Sales Range

Product

Sales

For Sales Range, my condition would be if the Sum(Sales)>100 for a particular Brand then Sales Range should have the value '>100'

This is how my Table should look

BrandSales RangeProductSales
TITAN>100FASTRACK50
TITAN>100SONATA80
TAGNULLWAT30

The solution would be an easy one. But I'm not sure how to do this in Qlikview. Any kind of help is much appreciated.

2 Replies
jsingh71
Partner - Specialist
Partner - Specialist

Share some sample data....

somenathroy
Creator III
Creator III

You may try like this at script level:

Use preceding load to calculate Range

Load Brand, if(Sales > 100,'>100',Null()) as Range;

Load Brand, Sum(Sales) as Sale

From <SQL_View_Table>

Group By Brand;


Then join with original table like:

Left Join(<SQL_View_Table>)

If you wish to do the same at UI, then try with calculated dimention by using Aggr function.

Regards,

Som