Display the variance between two variables on multiline graphs
Best Answer

@user08235 Definitely. If you already have them broken out by columns, and your aggregating the other two, then you should be able to create a beast mode that calculates the variance and put it in as another series. So, you'd want to leave the `Sales` and `Budget` columns in the Yaxis and the first series. Make sure they're summed. Then you can create a beast mode that does something like:
SUM(`Sales`)  SUM(`Budget`)
Depending on how you're data is structured, that should do the trick.
Thanks,
Jake
**Say "Thanks" by clicking the "heart" in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2
Answers

One option might be to use the period over period chart types if you have a date dimension in your dataset. This will give you the variance by default without needing to create a calculated field. Otherwise, you would need to create a new field with the variance calculation you're wanting to display, such as the percent change: (Current Value  Previous Value)/(Previous Value) or (Current / Previous)1.
At present, there are no default card options for displaying deltas or variances in a data label without creating a calculated field.
1 
Hey @user08235,
@nicolasfeddern's answer is definitely the easiest. If for some reason that doesn't work for your data, you could also create a DataFlow. Once it's in the card, you can graph your column and break it out by series, but all the values need to be in that column. You can create a DataFlow where you pivot out your series by date period you are measuring (to get your two graphed values on the same row) then add a new column that is the variance between the two new columns you've created. From there, you can append your new column onto the original column and break it out into 3 series: First value, second value, and variance.
Let me know if you'd like more in depth explination.
Thanks,
Jake
**Say "Thanks" by clicking the "heart" in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 
@Jaketh13 So it actually sounds like I may have my data structured in the way you described (if i'm understanding correctly) because my data is structured by having MONTH as the row, and the 'SALES' and 'BUDGET' values stored in columns (see attachment for visual). In order to create a 'variance' column (variable) and plot all 3 as lines on the same graph (as you suggest), can I do that just using a beastmode calculation that would calculate the:
1. SUM(SALES of X month)
2. SUM(BUDGET of X month)
3. VARIANCE between sum sales and sum budget
*(I don't know what the right formula would be to do that)
Or would I still have to accomplish this using a dataflow?
Let me know if i've completely misunderstood your suggestion, in that case I may need the extra detailed explanation that you offered ? Thanks!
1 
@user08235 Definitely. If you already have them broken out by columns, and your aggregating the other two, then you should be able to create a beast mode that calculates the variance and put it in as another series. So, you'd want to leave the `Sales` and `Budget` columns in the Yaxis and the first series. Make sure they're summed. Then you can create a beast mode that does something like:
SUM(`Sales`)  SUM(`Budget`)
Depending on how you're data is structured, that should do the trick.
Thanks,
Jake
**Say "Thanks" by clicking the "heart" in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2 
Yes  perfect! I was able to create the variance as it's own field and show all 3 variables in a single graph. Thanks!
1 
@Jaketh13 One last thing  is it possible to change the style of a line for 1 of the 3 series? For example, make it a dashed line, while the other 2 variables remain sold? This would make it easier for a user to visually see the difference between the 'variance' variable versus the 'sales' and 'budget' variables. Thanks again for your help!
0 
@user08235, Unfortunately, not yet. The only suggestion I would have is to make it a drastically different color than the other lines using color rules.
That said, it sound like a great idea. For things like this, you can check out our Ideas exchange here https://dojo.domo.com/t5/IdeasExchange/idbp/Ideas. If your idea exists then vote it up, otherwise submit your idea so others can vote it up
Thanks,
Jake
**Say "Thanks" by clicking the "heart" in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1
Categories
 10.5K All Categories
 8 Connect
 918 Connectors
 250 Workbench
 472 Transform
 1.7K Magic ETL
 69 SQL DataFlows
 477 Datasets
 198 Visualize
 254 Beast Mode
 2.1K Charting
 11 Variables
 17 Automate
 354 APIs & Domo Developer
 89 Apps
 3 Workflows
 20 Predict
 5 Jupyter Workspaces
 15 R & Python Tiles
 247 Distribute
 63 Domo Everywhere
 243 Scheduled Reports
 21 Manage
 42 Governance & Security
 178 Product Ideas
 1.2K Ideas Exchange
 12 Community Forums
 27 Getting Started
 14 Community Member Introductions
 55 Community News
 4.5K Archive