Qlik Deployment Framework

This group has been created to host, centralize and collect everything related to the Qlik Deployment Framework (QDF). QDF provides a set of best practices, libraries and utilities that facilitate the recommended setup and management of QlikView and Qlik Sense environments. Please note that an understanding of the Qlik platform is recommended before joining this group. <a href="https://github.com/QlikDeploymentFramework/Qlik-Deployment-Framework/releases" rel="nofollow noopener noreferrer"> Download QDF 1.7.3 here!</a>

Highlighted
Contributor

How to display sum calculation on Text Object

Hi,

I was creating sales analysis dashboard and I used three text object to display Actual, Forecast and Actual/Forecast which is the sum of Actual and Forecast. The value for Actual, and for Forecast displayed correctly, however the Actual/Forecast didn’t calculate properly whenever I select for different period.

But when I create this in straight table, the result for all three columns look correct, because I can add column(1) + column(2) for the last column which is Actual/Forecast.

Thanks,

Wossen

Tags (1)
6 Replies
MVP

Re: How to display sum calculation on Text Object

What is your expression for Actual and Forecast? May be like this

Sum(Aggr(RangeSum(Actual'sExpression, Forecast'sExpression), YourDimensions))

Contributor

Re: How to display sum calculation on Text Object

Hi Sunny,

I have an expression like this :

For Actual  = Sum(Shipment * price)

For Forecast = Sum(Forecast * price)

For Actual/Forecast = (Sum(Shipment * price) + Sum(Forecast * price))

Even I tried to do with variables

For Actual  = Sum(Shipment * price) => assigned  vActual

For Forecast = Sum(Forecast * price) => assigned  vForecast

For Actual/Forecast = (Sum(Shipment * price) + Sum(Forecast * price)) then used ( Sum(vActual + vForecast))

MVP

Re: How to display sum calculation on Text Object

So Actual and Forecast are working in text object but Actual/Forecast isn't? That is very strange? Would you be able to share a sample to show the issue?

New Contributor III

Re: How to display sum calculation on Text Object

Are the Forecast and Shipment data in different tables? That might explain why filtering on a date might give different results

Contributor

Re: How to display sum calculation on Text Object

Hi David,

They are on the same table. What makes me puzzled is when I used the expression on straight table,looks correct and when I applied the same expression on text object doesn't look right! Did I miss something here?

New Contributor III

Re: How to display sum calculation on Text Object

I was thinking that given you're using them on the same table and it was working was because the table would be using the underlying table JOIN implicitly, and hence without enforcing a filter on all of the data at once would then give a different outcome I think.

Can you identify the number that is wrong? Maybe chuck the data into excel and play with a pivot table and see if you can spot it if there's nothing obvious like filters or joins getting in the way.