Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a dynamic label that shows stock added on a certain date.
Normally I have a single column but now I have broken up my stock added into 4 rows so it looks like this:
What I would like to do is add a second row label that is the sum of these row labels so that I only have row for each column, something like this:
I believe that the formula is something like this but I can't quite get it right:
=aggr(rangesum(above(stock_added)),measure1,measure2)
I am not sure as to what exactly are you looking to achieve... would you be able to elaborate with an example?
I have also tried this:
=sum({<stock_week= {"(stock_week)"}>} total stock_added)
I don not believe that the total function works very well with set expressions...
I am trying to add another column that lists the stock added as an extra column. Adding it as a row used to be the cheeky way around the issue because there was only one entry however now I have 4 entries (by two dimensions) and aggregation formulas are not allowed except aggr. for row since rows only accept dimensions.
i.e. I want to use a measure as a row dimension
I don't think I understand, would you be able to share a sample to look at and may be share the expected output in an Excel file.
Yea sure,
stock week | stock added | sale_week 1 | sale_week 2 | sale_week 3 |
06/01/2020 | ? | x1 | y1 | z1 |
11/01/2020 | ? | x2 | y2 | z2 |
16/01/2020 | ? | x3 | y3 | z3 |
21/01/2020 | ? | x4 | y4 | z4 |
26/01/2020 | ? | x5 | y5 | z5 |
31/01/2020 | ? | x6 | y6 | z6 |
Now I know that this should be a simple sum(total var) calculation but I cannot get the set expression to work. I know that in the second column if I do stock week I get the exact same result as in the first column, but when I do this total expression my expression returns zero:
=sum({<stock_week={"stock_week"}>} total stock_added)