Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field that is version specific so it changes daily and weekly. In my data, I have the option whether to see daily data or weekly data. Is there any way I can create a field in a chart where even though I have daily filtered, it shows me a weekly value.
| version | product | location | daily orders |
|---|---|---|---|
| daily | A | Florida | 10 |
| B | New York | 10 |
| version | product | location | weekly orders |
|---|---|---|---|
| weekly | A | Florida | 20 |
| B | New York | 20 |
I want a chart where it shows me this: what expression can I use to to associate weekly and version to create a new field?
| version | product | location | daily orders | weekly orders |
|---|---|---|---|---|
| daily | A | Florida | 10 | 20 |
| B | New York | 10 | 20 |
remove version dim
sum({$ <Version={Daily}>} Orders)
sum({$ <Version={Weekly}>} Orders)
Hey, this should be possible using set analysis. Will be easier to help if you can share the expression for weekly and daily values.
The expression is just the field names from the upload file. It would be just =orders (but there will be orders from weekly and daily version)
The file would have
Version, Product, Location, Orders
daily, A, Florida, 10
weekly, A, Florida, 20
daily, B, New York, 10
weekly, B, New York, 20
To begin with
If you know how to add calculated dimension, then just add 'daily' as a dimension and don't add the field version.
If you don't, then just remove the field 'version' as dimension.
then for the expression, try this -
Expression1 - daily orders
if(version = 'daily', Orders)
Expression2 - weekly orders
if(version = 'weekly', Orders)
It doesn't work. See attachment
remove version dim
sum({$ <Version={Daily}>} Orders)
sum({$ <Version={Weekly}>} Orders)
Thank you all for your help