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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show values of an expression in a straight table

Hi,

I have a straight table with an expression with a value of either yes or no.

I just want to know, is it possible to show all the Yes values of an expression using a macro??

if possible can someone teach me how to do it..

thanks...

10 Replies
Not applicable
Author

I want to get the data that has a Yes value on the Different? column and then put those data in a qvd file..

Not applicable
Author

I hope someone can help me on this....

thanks!

SunilChauhan
Champion II
Champion II

take the help of following

tab1_temp:

Load

* inline

[

;



tab1:

load

*

,

''

as

junk

resident

tab1_temp where col3='yes'

;

drop

table

tab1_temp;



store

tab1 into

yourpath\a.qvd;

regards

Sunil





Sunil Chauhan
Not applicable
Author

the Different? column is a result of an expression that checks whether the UnitCost is the same with New..

SunilChauhan
Champion II
Champion II

in that case if u share sample file then only i will able to help u

Sunil Chauhan
Not applicable
Author

New is an InputField...

Not applicable
Author

The same expression (Different) can be written when you are loading the table (in scripting part). After table is loaded take the resident of the table and filter it by the variable(va4 is the expression).





dir:

LOAD

sno as yearqtr,

value

,

if

(value >100, 'Yes','No') as va4

FROM





table1:



dir1:

load

resident

dir where va4='Yes'; *



Not applicable
Author

INPUTFIELD New;

Products:

LOAD * INLINE [

ProductID, ProductName, UnitCost

1, Lenin Jeansshorts, 15.37

2, Mr2 Trousers, 16.17

3, Chantell Shirt, 15.45

4, Rossi Shorts, 19.34

5, O-Man Underwear, 4.72

];

Temp:

Load ProductID,

UnitCost as New

Resident Products;



and in my straight table, my expression is: =if(Money#(UnitCost,'$#,##0.00;($#,##0.00)') <> Money#(New,'$#,##0.00;($#,##0.00)'),1,0 ). this checks whether the UnitCost is equal to New.

Now, i want to get all the data if the result of the expression is 1 then export it to a qvd file..

what i'm trying to do here is a dynamic price list..

thanks

Anonymous
Not applicable
Author

Do you want to do this automatic in the script?
If not you can just right click on the charts and choose "Export..."