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

Adding a Measure as a Dimension in Pivot Table

I have a situation where I want a measure, like a weekly average for the dimension value to the dimension values in a pivot table. For example in the below I would like the overall average next to the state before the measure values by month.

datagrrl_0-1712925663216.png

Something more like this

datagrrl_1-1712925772685.png

 

Thanks in advance.

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

You may try something like this as calculated dimension:

aggr(sum(Sales) / count(distinct Month), State)

 

View solution in original post

4 Replies
Anil_Babu_Samineni

Please share us the sample file or data in excel. So that, we can work for you and help. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

You may try something like this as calculated dimension:

aggr(sum(Sales) / count(distinct Month), State)

 

stefanmereuta
Partner - Contributor
Partner - Contributor

You can show the average column next to the states using totals, without a new dimension. Change your measure to something like this:

Avg(Aggr(Sum(Sales), Month, State))

Then click your month dimension and turn on "Show totals". It should show the sum for each month and the average for all months in the first column.

datagrrl
Creator III
Creator III
Author

Thanks, this helped them and we figured out a solution.