Add target values through parameters/calculated fields

I am trying to make a visual that shows our sales compared to our target for a set interval on time (dynamic, ideally it would change based on filters). The target values are not in the dataset, so I would need a way to add them somehow.

I’ve been trying to add them in a calculated field (see formula below) but I don’t think this is the best way to go about this, as it just sums up the value (ex. 431608 for January) for each row that has the Month Number set to 1, and I don’t know how to make it show only once - and then add up February if I filter by these 2 months. I also tried using parameters with no luck.

Thanks in advance!

Formula:
ifelse(
{Month Number} = 1, 431608,
{Month Number} = 2, 606446,
{Month Number} = 3, 556392,
{Month Number} = 4, 570974,
{Month Number} = 5, 577852,
{Month Number} = 6, 372824,
{Month Number} = 7, 529704,
{Month Number} = 8, 347126,
{Month Number} = 9, 408376,
{Month Number} = 10, 589698,
{Month Number} = 11, 530970,
{Month Number} = 12, 485702,
null
)

Hi @SuciuAlex,
In terms of creating a new column that can show those values, I would suggest exploring the switch function, I created an example with test data and it looked something like the following:

switch(Industry,
“Communications”, “100”,
“Consumer Products”, “200”,
“Energy”, “300”,
“Finance”, “400”,
“Healthcare”, “500”,
“Manufacturing”, “600”,
“Misc”, “700”,
“Retail”, “800”,
“Tech”, “900”,
“Transportation”, “1000”,
“Other”
)

And the outcome was the following:

Let us know if you have any additional questions!

1 Like

Hi @SuciuAlex,
It’s been awhile since we last heard from you on this thread; following up to see if you had any additional questions?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!