Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

Help to create a flag

Hi All,

I have two fields Equipment and Revenue Type.

In revenue type i have four columns:

2.Contract_Revenue
1.Sales_Revenue
3.Labour/Driving/Freight
4.Material_Part

 

Now the output i needed is whatever equipments i have when i click 1.Sales_revenue only those i need to get in a separate field.

Can you please tell me how can i get it.

Thanks,

Bharat

1 Solution

Accepted Solutions
bharatkishore
Creator III
Creator III
Author

Sorry Arvind, if i am not clear. I have acheived it by writing below expression.

if(Revenue_Type='1.Sales_Revenue','In Sales Data','Not In Sales Data') as Sales_Flag,

Thank you so much for your time.

View solution in original post

7 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi,

Please use = GetFieldSelections(Fieldname)

Thanks & Regards,
Arvind Patil
bharatkishore
Creator III
Creator III
Author

Thanks for the reply but I need to do in script...
arvind_patil
Partner - Specialist III
Partner - Specialist III

Not possible in script level.

if you performing action on front end it will not calculating at back end afterwords.
Thanks & Regards,
Arvind Patil
pradosh_thakur
Master II
Master II

Hi

Your requirement is not clear may be you need to describe more.

You will click on UI but need this in script? Can you please tell us more with some proper sample data.
Learning never stops.
bharatkishore
Creator III
Creator III
Author

I have few columns in load script and in that i have Equipment and Revenue Type as well.

Now in script i need to write a condition that where Revenue Type is 1.Sales_Revenue get those equipments as New column.

For Ex: Revenue Type / Equipments

 

1.Sales_Revenue        10

2.Contract_Revenue 20

Now  i need to only that 10 as new column.

Hope i am clear.

Please let me know if you need anything more.

arvind_patil
Partner - Specialist III
Partner - Specialist III

May be like below:
Data:
Load * Inline [
Revenue Type ,Equipments
1.Sales_Revenue , 10

2.Contract_Revenue, 20
];

Noconcatenate
Final Data:
Load Revenue Type Equipments as [New Equipment ],
' Restricted data' as flag Resident Data Where wildmatch(Revenue Type,'1.Sales_Revenue') ;
Concatenate(Final Data)
Load * Resident Data;

Thanks & Regards,
Arvind Patil



bharatkishore
Creator III
Creator III
Author

Sorry Arvind, if i am not clear. I have acheived it by writing below expression.

if(Revenue_Type='1.Sales_Revenue','In Sales Data','Not In Sales Data') as Sales_Flag,

Thank you so much for your time.