Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW TO ADD MACROS ??

HELLO FRIENDS!

I have a small problem. Here we go.

1) Have a Data table with around 15 data, discount table, and price table.

2)Some of the products have a discount o either 25% or 30%.

3)WITHOUT CHANGING THE SCRIPT, HOW DO I ADD IN A MACRO, SUCH THAT, WHEN I CLICK A PRODUCT WITHOUT A DISCOUNT, IT AUTOMATICALLY CLICK THE DISCOUNT?

(BECAUSE NOW, I WANT THE PRODUCT TO HAVE DISCOUNT OF 25% BUT I CAN'T CHANGE IT FROM THE MAIN EXCEL FILE. )

IS THERE ANY WAY OF DOING IT ?

IN THE QLIKVIEW FILE, LET US SAY I WANT TO CLICK ON "IC SWITCH" & " MOBILE BROADBAND SOFTWARE", INITIALLY IT DOESN'T HAVE A 25% DISCOUNT, BUT HOW DO YOU MAKE IT SUCH THAT WHEN I CLICK THOSE 2, IT CHANGES TO HAS 25% DISCOUNT, AND REFLECTED ON THE DISCOUNT TABLE?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Nilesh,

Attached the QVW file for your reference. You can edit the discount column .

View solution in original post

8 Replies
Not applicable
Author

Hi,

I have displayed the text without reloading the QVW file using macro.i doubt you will be able to update the Qlikview table in RAM through Macro and get the association.

If you want to display the newly added discount without reloading the QVW file.

Create a variable in QVW files.

Estabilish the connection to the database and pull the data from database using macro.

Assign the database value to the variable. And create the trigger as the sheet opens or through the button.

I havent tried this.

Not applicable
Author

Hi XXX!

Could you do me a favour? Please put it into my sample and add your method inside, i'll have a look,

Thanks! =D

llauses243
Creator III
Creator III

Hi Nathanael ,

This is my offer ... pls see image & .rar

Good Luck, Luis

Not applicable
Author

Hi Ilauses! That was a good solution!

But your DISCOUNT2 ( NEW) BOX, What you did was to select everything without a discount value and give it a 25%, what i'm looking for is only, how do you add the discount value for only 1 or 2 of the products?

Initially, some of the products have either a 25% or 30% discount.

Now, i want another 2 products to also have 25% discount.

So its like, i want only this 2 products, to also have a 25% discount.

Do you understand?

Thanks! =D

Not applicable
Author

Hi Nathanael,

I have few queries on your requirement . When you say

Initially some of the products have either a 25% or 30 % discount . And you want another 2 products to also have 25 % discount.

Question1: want to pull products with 25% without reloading or u want to just change in QVW file for what if analsyis.

Not applicable
Author

Hi XXX.

Okay, let me explain.

1) Originally, there are few products with a 25% or 30% discount. It is read from the excel file.

2)Now, WITHOUT change the excel file, i need to add a 25% discount for another 2 products.

That is the main problem. How do you give an expression or a function to make sure that the 2 products have a 25% discount also! (without tampering with the main excel file).

Thanks! =D

Not applicable
Author

Hi Nilesh,

Attached the QVW file for your reference. You can edit the discount column .

Not applicable
Author

Hi XXX! That is a nice solution! Thanks!!