Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Creator III
Creator III

Need help in writing the expression for total in pivot table

Hello everyone,

I need help in writing the expression for total in pivot table.In my case i have two dimension one is state and one is product and they want to view the total for both the dimensions.Now the issue is that they want product dimension at the top of the table so when i am writing an expression for the total it is different for both the dimension so i want to know how i can do this.

1 Solution

Accepted Solutions
jonathandienst

Hi

You can write an expression that evaluates differently for the total rows by using Dimensionality()

If(Dimensionality() = 0, ... expression for grand total of all states/products ... ,

    If(Dimensionality() = 1,  ... expression for total for all products in each state  ... ,

        If(Dimensionality() = 2, ... expression for total per product ... ,

          ... expression for detail lines

        )

    )

)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst

Hi

You can write an expression that evaluates differently for the total rows by using Dimensionality()

If(Dimensionality() = 0, ... expression for grand total of all states/products ... ,

    If(Dimensionality() = 1,  ... expression for total for all products in each state  ... ,

        If(Dimensionality() = 2, ... expression for total per product ... ,

          ... expression for detail lines

        )

    )

)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post