Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomcatxx
Creator
Creator

Pivot Table expression

Hi, there. I want to make a pivot table like that. There are only 2 dimensions 'Minifabrik' and 'Day'.

MinifabrikDayWeThFrAvgTarget
MF1%%%%%
MF2%%%%%
MF3%%%%%
MF4%%%%%

I made a table but not finished.

3.PNG

Values for column We Th and Fr are  Sum(A)/Sum(B).

Can u help me to write expression for column Avgerage and Target?  Target = avg(T)

Thank you.

data source

Load  Minifabrik,

          Day,

          A,

          B,

          T

From xx.qvd

12 Replies
niclaz79
Partner - Creator III
Partner - Creator III

Avg(RangeSum(Before(Sum(A)/Sum(B),0,7)) maybe?

suhaskharat
Contributor III
Contributor III

Use below formula for average

Column(1)+Column(2)+Column(3)/3

for target as u have mentioned

(Column(1)+Column(2)+Column(3)/3)/100

tomcatxx
Creator
Creator
Author

Thank u, but it doesn't work.

no.PNG

tomcatxx
Creator
Creator
Author

Can u you write Expression for that?  And sometimes I have data for 7 days(Mo~So). In this table, the null value just will not be showed.

niclaz79
Partner - Creator III
Partner - Creator III

Ok, try the following

Avg(Sum(TOTAL <MF> A)/Sum(TOTAL <MF> B))

sunny_talwar

Would you be able to share some raw data or a sample app?

tomcatxx
Creator
Creator
Author

Yes, I made a test.

balabhaskarqlik

May be like this:

=Sum(Sales) / Count(DISTINCT Date)

sunny_talwar

Where is the test file? can you share it with us?