Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Disable expression by a macro

Can a expression be disable with a macro???

Tags (1)
1 Reply
Contributor III

Disable expression by a macro


Yes expression can be disabled through macro.

I found this example in the API Guide.Qvw file.

Just go through the sample

//////////////////////////////////////////////////////// Below is the Sample Code which will create a straight table and disable's the first expression//////////////////////////

Set chart=Activedocument.activesheet.createStraightTable

Chart.AddDimension "Customer'

Chart.AddDimension "ProductType"

Chart.AddExpression "Sum(Amount)"

Chart.AddExpression "Count(Customer)'

Set Cp=Chart.GetProperties

Set Expr=Cp.Expressions.item(0).Item(0).Data.ExpressionData


Chart.Set Properties Cp