¿How can I classify an object based on conditions?
Hello Community,
I have a dataset in which I have the course code, name and number of tools used. What I require is to be able to classify these courses by levels, which to be at level 1 must use at least 2 tools from an established list. To be level 2 you must use at least two tools from level 1 and three established for level 2.
Level 1 [Low]
* News
* Contents
* Evaluations (Types of questions: Multiple choice, multiple answer, true and false)
Conditions: You must use at least two level 1 tools.
Level 2 [Medium]
* Evaluations (Types of advanced questions).
* Forums
* Activities
* Rubrics (online and face-to-face activities)
* Class progress
Conditions: You must use at least two level 1 tools and three level 2 tools.
Level 3 [Advanced]
* Groups
* Intelligent Agents
* Awards
* Competencies.
Conditions: You must use at least one level 1 tool, three level 2 tools and one level 3 tool.
I tried to create a segment and add a CASE with several conditions, but this option does not work for me.
ANY HELP PLEASE.
THANK YOU
Answers
-
@andersson_morales19 You're case when statement isn't working because of the waterfall. CASE WHEN statement go through each part of the statement and once a condition is met, it doesn't evaluate anything else. So in the case of your beast mode, if a row meets the 'Basico' condition, it assigns it as 'Basico' and won't evaluate it further, even if it meets other conditions in the statement. So level two and level three will always meet level one conditions, so as you have it right now, you'll never find level two and three, everything will just be level one. You would need to reorganize your case when statement to start with the conditions for level three, then level two, and end with level one. Hope that makes sense!
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
3 -
Hello @RobSomers,
Thank you very much for your help. Reviewing what you tell me I have proposed the solution as follows:
I have raised the AND - OR conditions based on the requirements of each level, I appreciate if you can help me.
Thank you so much.
0 -
@andersson_morales19 I would modify your statement further. Right now when you look at how many tools are used and you look at 'Basico', if they just used one 'cantidad _noticias' an that was it, they would qualify for Basico even though they only used one tool. For level one, does it have to be two different tools, or could it be two of the same (Ex: two 'cantidad_noticias' and nothing else)? This will determine how complex your beast mode will be.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
1 -
To rank at the [Basic] level you must use at least 2 tools, it doesn't matter if you use it at least 1 time.
The tools for level 1 are: News, content and questionnaires.
If a course uses at least one tool from the basic level, it would be advisable to classify it in the basic level even if it does not meet the conditions because the idea is that it does not remain unclassified. For a case that does not use any tools then it is classified [No Use].
Thank you very much for your help.
I apologize if my translation is not correct. 😳
1 -
@andersson_morales19 post a sample of your dataset please.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Hello @jaeW_at_Onyx ,
I add this Levels of Use [Tests] dataset to analyzer and create a beast modes segment with the following conditions:
---------------------------------------
CASE
WHEN 'Básico'>=1 AND 'Medio'>=3 AND `cantidad_grupos`>=1 OR `cantidad_agentes_inteligentes`>=1 OR `cantidad_competencias`>=1 OR `cantidad_premios` THEN
'Avanzado'
WHEN 'Básico' >=2 AND `cantidad_foros` >=1 OR `cantidad_rúbricas` >=1 OR `cantidad_actividades` >=1 THEN
'Medio'
WHEN `cantidad_noticias` >= 1 OR `cantidad_contenidos` >= 1 OR `cantidad_cuestionarios` >=1 THEN
'Básico'
ELSE
'Sin Uso'
END
---------------------------------------
After creating the segment, I add it as a column so that the level of use can be classified.
The conditions for it to be classified must be the following:
Level 1 [Low]
* News
* Mail
* Contents
* Assessments (Types of questions: Multiple choice, multiple answer, true and false)
Conditions: You must use at least two level 1 tools.
Level 2 [Medium]
* Assessments (Types of advanced questions).
* Forums
* Activities
* Rubrics (online and face-to-face activities)
* Class progress
Conditions: You must use at least two level 1 tools and three level 2 tools.
Level 3 [Advanced]
* Groups
* Intelligent Agents
* Awards
* Competencies.
Conditions: You must use at least one level 1 tool, three level 2 tools, and one level 3 tool.
Thank you very much for your help.
0 -
@andersson_morales19 i think you need CASE and aggregation.
so something like
CASE
WHEN
count(column) + count(other_colum) <= 3
AND
count(column_3) + count(column_7) <= 3
THEN ...
WHEN
count(column) + count(other_colum) <= 3
AND
count(column_3) + count(column_7) <= 3
THEN ...
END
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1
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
- 627 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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