Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Activate / deaktivate pivot expression by macro

Hi

I have not found how to activate / deactivate a pivot formula (express) with an API macro. Any help?

Thx  a lot

Marcel

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can remove and add expression using below

    

rem ** delete second expression from chart CH01 **

set chart = ActiveDocument.GetSheetObject("CH01")

chart.RemoveExpression 1

set chart = ActiveDocument.GetSheetObject("CH01")

chart .AddExpression "sum(Amount)"

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you are using Qlikview 11 you can do this by Conditional enablement of expression in Expression tab.  No need of using Macro.

Hope this helps you.

Regards,

Jagan.

hugmarcel
Specialist
Specialist
Author

Ok, nice to know the trick with QV 11. However, I am ussing QV 10 still.

How to add a label for the added expression then? I do not like to have ""sum(Amount)"" as label.

Thx - Marcel

jagan
Luminary Alumni
Luminary Alumni

Hi,

Hope the attached image helps you.

Regards,

Jagan.