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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_S
Contributor II
Contributor II

Accumulation in a Pivot Table

I have a simple Fact table with the following fields;

  • Takeover Month
  • Months After Takeover (0,1,2,3...)
  • Revenue

 

I'm trying to build a Pivot Table that has Takeover Month on the Left and Months After Takeover on the top. My Measure is Sum(Revenue) but needs to accumulate in the Months After takeover.

---

Below are some of the things I've tried that haven't worked;

I've managed to get it to accumulate in the wrong dimension using this

RangeSum(Above(If(Count([$(=Replace(GetObjectField(0),']',']]'))]) > 0, ( Sum(
Revenue)) + Sum({1<[$(=Replace(GetObjectField(0),']',']]'))]={">=$(=Min([$(=Replace(GetObjectField(0),']',']]'))]))<=$(=Max([$(=Replace(GetObjectField(0),']',']]'))]))"}>}0), 0), 0, RowNo()))

Switching it to ColumnNo() also didn't work. Nor did replacing the zeros with ColumnNo and RowNo with zero.

 

I expected this to work, but it just gives me the same result as if I had the straight Sum;

=Sum(
{<
[Months After Takeover]={">=0,<=$(=Max([Months After Takeover]))"}
>}
Value)

Labels (1)
2 Replies
BrunPierre
Partner - Master II
Partner - Master II

May this;

=Sum({$<[Months After Takeover]={">=0<=$(=Max([Months After Takeover]))"}>}Value)

 

Andrew_S
Contributor II
Contributor II
Author

That didn't work either. Thanks for the suggestion though. Each failure is one step closer to success 🙂