Identify Null Roll-Ups in a Pivot Chart
Hi Folks,
Question:
How do I identify blank values in a pivot chart? I want to filter where all values are blank against any column in a pivot chart but no option. I can't do it in the ETL either because it needs to be dynamic based on a date selection. (dates are the columns)
Context
I have the fields 'People', 'Dates', and 'Hours'. The goal is to have a view pivoting dates to columns, summing the time under these dates, and viewing the people as the rows to see the people who have not got time against a particular week. This is achieved by a simple group by then pivot method
Method (Images)
Raw (ignore 'week' field)
Add Start of Week
group by Start of week and people, summing hours into Hours by week:
Pivot columns:
I've build this in Domo but stopped at the pivot step (since it needs to be dynamic).
I use a pivot chart with data that is at the grouped by start of week and people stage, using the start of week as columns.
The issue is in the pivot chart there is no option to filter the data to the rows where people have null against a week. Since it's so dynamic (end-users will use page filters for date ranges) I want to avoid hard code logic based on totals either.
All help is appreciated!
Best Answer
-
Here is a tutorial put together by @MarkSnodgrass with filling in missing dates.
1
Answers
-
You could create a beast mode that counts by week (or whatever is defining your columns) and filter by that.
Something like:
SUM(COUNT(People) fixed(by Week))
Fixed function article:
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
Would there be a use case where a user would apply a date filter that would cut in the middle of a week? If not, you could create your null filter per user by week. This way there would be a flag in your dataset to indicate each week where a user had a null value.
0 -
@ST_-Superman-_ This sounds similar to @DavidChurchman 's suggestion - which is looking promising.
The issue I have with this is that it requires the filter context of the week to display the nulls/blanks. So when placed in the values section of the pivot options it aligns with the summed hours but once brought into the filter section of the card there are no blank values.
Reason for this:
There are no people with zero time. Some just don't have it against a specific week. So external filters seem to only look for when time < 0 or equivalent - which doesn't exist.0 -
Ah. In this case you will need to join your data to a calendar dataset so that you get at least one row of data for every individual. This will allow Domo to find values for any combination of dates, even if there is no data originally present.
This has been written up in other solutions as well, I'm pretty sure there may even be a video tutorial about it floating around somewhere. Here is one post, I'll keep looking for the tutorial:
0 -
Here is a tutorial put together by @MarkSnodgrass with filling in missing dates.
1 -
I'm sorry, I misunderstood the question. You want to be able to filter for where the value is NULL in the pivot table.
You can't filter for rows in your dataset that don't exist (which is why it's null in your pivot table). I think you want to adjust the data so that there is a row of data for every person for every date of interest. To do this, in an ETL, you could join a calendar with your dataset to ensure all people have a row for all dates of interest. Then you could create a BeastMode that's responsive that you can filter on.
CASE WHEN value IS NULL THEN 'FILTER ME' END
For the calendar bit, there are different examples of how to do it, but this one looks translatable to your situation:
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
Hi @DavidChurchman and @ST_-Superman-_
Following @MarkSnodgrass's video - creates a many-to-many relationship for me. Constants on every day joining constants on every day. It's similar to what I have but I had added a constant 'dummy_person' against every calendar day, then left joined on the dates which should have been 1-2-1. The nulls would be the future.0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 747 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 126 Manage
- 123 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive