Coalesce for a missing month?

I can't seem to get a magic to work, nor can I seem to get a beast mode to work.
I am sorting data by month. If though, my data does not have data for May (5) then I want there to be a row for May, even if there isn't data.
Somewhat obviously, a case statement wont work because again, when there is no data, then no row.
But, how do I get a row for May? Do I use coalesce?
What if I have no data for May and August?
CASE
WHEN MONTH(AccountingPeriod
) = 1 THEN 1
WHEN MONTH(AccountingPeriod
) = 2 THEN 2
WHEN MONTH(AccountingPeriod
) = 3 THEN 3
WHEN MONTH(AccountingPeriod
) = 4 THEN 4
WHEN MONTH(AccountingPeriod
) = 5 THEN 5
WHEN MONTH(AccountingPeriod
) = 6 THEN 6
WHEN MONTH(AccountingPeriod
) = 7 THEN 7
WHEN MONTH(AccountingPeriod
) = 8 THEN 8
WHEN MONTH(AccountingPeriod
) = 9 THEN 9
WHEN MONTH(AccountingPeriod
) = 10 THEN 10
WHEN MONTH(AccountingPeriod
) = 11 THEN 11
WHEN MONTH(AccountingPeriod
) = 12 THEN 12
else AccountingPeriod
END
Answers
-
@Canio Coalesce is very helpful for null handling, but it cannot add new rows to your data. Some chart types (like bar charts) have an option to fill in missing dates if a date field is used in the X axis. Otherwise, you will need to create a separate period mapping dataset to join or append in a dataflow and add the missing rows.
0 -
@MichelleH ,
That's what I thought. Outer joins in Magic don't work, so I was hoping I could use a beast mode. Thank you0 -
If you want to append row you wouldn't do a JOIN but use the APPEND tile instead, just make sure you format your data to include any datapoints you want and any possible combinations by which your users might need to be able to filter on, otherwise, as soon as a filter gets applied to the dataset, your FILLED rows will just banish.
0 -
@MichelleH I was able to get what I needed. It just took a little work.
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 655 Datasets
- 114 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 770 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 76 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive