Is there a reason why you cannot change the legend labels in a Period over Period chart type?
I'd love if there was a quick way you could change them like you can to the y-axis for example when you click the dropdown.
I know there is a way in a normal bar + line chart to make a beast mode for the time period you want and add it to series to manually plot the bar and line against each other a year apart but I have never been able to make that work.
Best Answers
-
Looks like the series that you were using is
Year
. I would try creating a calculated field. Assuming you don't have any future dates in your data you could do something like this:CASE
WHEN
DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 12 MONTH), INTERVAL DAYOFMONTH(CURDATE())-1)
>DateField
THEN 'Current'
WHEN
DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 24 MONTH), INTERVAL DAYOFMONTH(CURDATE())-1)
>DateField
THEN 'Previous'
ENDYou could then place this in your filter and select 'Current' and 'Previous'. Then use this field as your series as well. You can change the "Current" or "Previous" in the formula to whatever you want the label to say
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman3 -
@jakebutterfield This may be able to work with variables and for that, you need to create two variables "Current year" and "Previous year" and then put them along with the BM to create a line graph.
(CASE WHEN YEAR(Date
) =CY
*1 THEN IFNULL(Values)`,0) ELSE 0 END)(CASE when YEAR(
Date
) =PY
then (IFNULL(Values)` ,0) ) else 0 end)1
Answers
-
@jakebutterfield Domo's PoP charts are generally pretty rigid as far a customization goes, unfortunately. What have you tried in the bar + line charts?
1 -
This is as close as I have been able to emulate it, the problem is getting my most recent months to show up to the right with Mar '23 being in the furthest to the right. I have tried sorting by but have never been able to get it like the period over period chart which is exactly how I want it to look which is frustrating as all I need to do is change the legend labels.
0 -
Looks like the series that you were using is
Year
. I would try creating a calculated field. Assuming you don't have any future dates in your data you could do something like this:CASE
WHEN
DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 12 MONTH), INTERVAL DAYOFMONTH(CURDATE())-1)
>DateField
THEN 'Current'
WHEN
DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 24 MONTH), INTERVAL DAYOFMONTH(CURDATE())-1)
>DateField
THEN 'Previous'
ENDYou could then place this in your filter and select 'Current' and 'Previous'. Then use this field as your series as well. You can change the "Current" or "Previous" in the formula to whatever you want the label to say
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman3 -
Thanks for the replies, it helped me get further however, I have it graphed and instead of the Current and Previous being graphed on top of each other it is showing 24 months with previous being on the left and current on the right. Is there a way I can ensure them being in top of each other so i can see the current month vs the previous month? I am drawing blanks…
0 -
Here is the beast mode I have for previous/current
0 -
@jakebutterfield This may be able to work with variables and for that, you need to create two variables "Current year" and "Previous year" and then put them along with the BM to create a line graph.
(CASE WHEN YEAR(Date
) =CY
*1 THEN IFNULL(Values)`,0) ELSE 0 END)(CASE when YEAR(
Date
) =PY
then (IFNULL(Values)` ,0) ) else 0 end)1 -
0
-
So I didnt use the variables for that @Sayyed007, but it helped me realize that my x axis was wrong. If I want 12 months to be graphed and have multiple years on it I needed to graph by a column with Month names in it, instead of a date column that includes years in it. This way I am able to graph side by side different years with the x axis consisting of just the 12 months.
My month_year x axis allows me to get multiple years on it. Phew, what a relief. This has been my biggest learning curve since joining DOMO, getting time-series graphs to behave the way I'd like them too. But we live and learn. Thanks @Sayyed007 @ST_-Superman-_ & @MichelleH !
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive