Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III

Sum in straight table is not matching with data

Hi everyone,

While i'm developing a straight table, I found out that the Sum that is being displayed is quite different from the actual data.

 

 

Some more information:

Dimension:

- Synthetic Dimension: Valuelist('ExampleA')

- Month Year (MMMYYYY)

Measure: 

- if(Valuelist('ExampleA') = 'ExampleA', Sum({< [Year]={"$(=Max(Year))"}, [SearchString]={"*String1*"} >}[Interactions]))

 

Imagine, the straight table give me 103 for January. However, if i create a pivot table with all those dimensions (Country, SearchString Month Year) and Export it to a excel, the total is still the same as the Sum(103), but the sum of all the values in the rows for January give me 475. 

 

Is this a aggr problem?

 

Any tip would be highly apreciated!

Thanks for the help!

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

It might be an aggregation problem; try this:

sum(aggr( Sum({< [Year]={"$(=Max(Year))"}, [SearchString]={"*String1*"} >}[Interactions]), Country, SearchString, MonthYear))

View solution in original post

12 Replies
50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III
Author

Can anyone help me here? 

If more information is needed, please let me know!

 

Thanks!

lorenzoconforti
Specialist II
Specialist II

can you post a sample dashboard? It would be easier to help you

50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III
Author

Hi Lorenzo,

 

Unfortunately, I cannot provide a data sample, as long as i'm working on PRD Data...

Perhaps, a print screen of the KPI with the value and a sample of the csv data is enough?

 

Thanks!

lorenzoconforti
Specialist II
Specialist II

ok, let's start with that

50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III
Author

Here you go!

 

-Print Screen: Values showed in the dashboard

-Excel file: Exported data from the dashboard

 

Let me know if this suits you or not!

 

lorenzoconforti
Specialist II
Specialist II

What measure are you using in the pivot? Also, can you post a screenshot of the straight table as well?

50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III
Author

The Measure is pretty much the same: 

 

Measure: 

- if(Valuelist('ExampleA') = 'ExampleA', Sum({< [Year]={"$(=Max(Year))"}, [SearchString]={"*String1*"} >}[Interactions]))

 

Thanks for the help!

lorenzoconforti
Specialist II
Specialist II

can you check two things:

- if you remove set analysis, do totals match? 

if(Valuelist('ExampleA') = 'ExampleA', Sum([Interactions]))

- if you remove valuelist, do totals match?

 Sum({< [Year]={"$(=Max(Year))"}, [SearchString]={"*String1*"} >}[Interactions])

50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III
Author

Tried both approaches: None of them made the values to change/match.

(On the approach to remove the set analysis, i've made the selections by 'hand', also)