Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been unable to find a specific question like this on the forums, though I may just be searching in the wrong way since it doesn't seem a particularly uncommon case. Another way to phrase it might be 'how to use a dimension (2 below) for only a single expression'.
I would like to have a pivot table where one expression uses fewer dimensions than the other (see below). Set analysis or dimensionality with partial sums leave duplicated or blank rows in the table respectively, so that doesn't give me what I want. Any help is greatly appreciated.
What I want:
The closest I can get to that is to use dimensionality() and partial sums in the pivot table, which gives this:
All the values / totals are correct here, but I have entire rows of pointless blank cells. Tried unsuccessfully to use conditional on 'Expression 1', but then it either appears or not in the entire table, rather than row-by-row.
How about this ?
the 1st expression has a formula of: if( dimensionality()=1, Count(distinct Customer), Sum(Sales))
How about this ?
the 1st expression has a formula of: if( dimensionality()=1, Count(distinct Customer), Sum(Sales))
Jackpot. Can't believe using a single if/else expression escaped me, but this is exactly what I needed. Thanks!
I was never able to understand the concept of dimensionality before today. Thanks to your sample qvw file, I have a much better idea about it and will def. use this in the future.
Best,
S