Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stright Table Expression

Hi All,

can any one guide me on the following scenario, I have 3 fields Sales Agent Id, Location, Sales , by using  these 3 fields we know

sales information per particular area for each sales agent.

in the Qlikview if I select any location ,it will show the data about that location, by discarding the null values or the sales agents who are not having the data.  my requirement is I need to show those excluded customers also with default value 255. how can I achieve it.

Thanks

John

8 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi John,

your xlsx appears to be empty, so is difficult to help!

Andy

Not applicable
Author

HI Andrew Whitfield,

thanks for your inputs, I have updated new xlsx PFA.

Regards

John

Vegar
MVP
MVP

You could make it with an IF() in your expression.

if(sum(Sales),sum(Sales),(255))

Do not Supress zeros.

Show all dimensions.

Please take a look at my attached example.

Cheers

Vegar Lie Arntsen

Not applicable
Author

Hi Vegar Lie Arnten

Thanks.  in attachment I am getting all the Sales agents Ids but what I need, if I select NY would like to see only the Sales agents who are representing the NY. output like

   

1NY250
4NY230
5NY255
9NY255
PrashantSangle

Hi,

Use below script

Test:

LOAD [Sales Agent ID],

     Location,

     if(isnull(Sales) or len(trim(Sales))=0,255,Sales) as Sales

FROM

community1.xlsx

(ooxml, embedded labels, table is Sheet1);

and then in front end

take Straight table ->

Dimension : Sales Agent Id and Location

and

Expression :Sum(Sales)

Regards

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 🙂
Vegar
MVP
MVP

You need to remove show all values from Sales agent ID and add Location with the preferences in the pic. See also my qvw attachment

Location prop.PNG

PradeepReddy
Specialist II
Specialist II

try it in back end... try with anyone option..


1) if(isnull(Sales),255,Sales) as Sales

2) if(isnull(Sales) or len(trim(Sales))=0,255,Sales) as Sales

Not applicable
Author

I suppose you don't want to deal with null on Load script.

See the attachment then , based on your xls