beastmode
I working on a categorical text dataset with thousand of rows, I have a text column called 'indicatortext' with 21 distinct values , I have another column called 'result' with 7 distinct values, I want to create a table with indicatortext as the row and the percentage occurrence of one of the categories in result column, also the count occurrence of one the categories in result column based on the indicatortext columns(basically how many times, and the percentage occurrence of a categories is appearing for the distinct text in indicatortext column.
I have the below code for percentage COUNT(CASE WHEN `Result` LIKE '%Non-Compliant-Urgent%' THEN 1 END) / COUNT(DISTINCT `IndicatorText`) OVER (PARTITION BY `IndicatorText`) but i am getting zero's as the outcome
this the outcome i trying to get
Answers
-
@NIKKI Do you plan on having a single row per value of the Indicator Text field? If so you do not need to partition by that field in your card because your data will already be grouped by that field. Also, note that your denominator will always be 1 in this case based on your current formula. If that's not what you want, then you can remove the word DISTINCT from your formula to calculate the percentage based off the total number of rows.
1 -
Thank you Michelle,
I tried this COUNT(CASE WHEN
Result
= 'Non-Compliant-Urgent' THENIndicatorText
END) / COUNT(IndicatorText
). but I am still getting zero's populating on my tabel0 -
What I plan on having is the percentange of non-compliant category in result column by the distinct text in indicator text column
0 -
Yes, I even use wildcard, LIKE %
0 -
this is what the raw data looks like.
The first column is the indicator text and the 2nd column is the result with categories.
this is what the output looks like
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
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive