Forum Discussion
undefined
- Anonymous2 years ago
Hola MPG1907. Recomiendo que crees dos consultas adicionales.
La primera, una consulta que sea Class code, para poder relacionar con Class Sub-Code, debes quitarle los numeros a partir del guion medio.
Y la segunda tabla, es la tabla calendario. Con este formula DAX la puedes crear:
TablaCalendario =VAR T_Calendario =ADDCOLUMNS(CALENDARAUTO(),"Año", YEAR([Date]),"Semestre", "Semes. " & CEILING(MONTH([Date])/6, 1),"Cuatrimestre", "Cuatr. " & CEILING(MONTH([Date])/4, 1),"Trimestre", "Trim. " & CEILING(MONTH([Date])/3, 1),"Bimestre", "Bim. " & CEILING(MONTH([Date])/2, 1),"Mes Número", MONTH([Date]),"Mes Nombre", FORMAT([Date], "MMMM"),"Semana", "Sem. " & WEEKNUM([Date], 2), -- El número 2 indica que la semana comienza en lunes"Día Número", WEEKDAY([Date],2),"Día Nombre", FORMAT([Date], "dddd"))RETURNT_CalendarioSi está satisfecho con esta respuesta, márquela como solución para que otros la encuentren. - Anonymous2 years ago
Hi MPG1907 ,
First of all, thank you andrezmar and qqqqqwwwweeerrr for the quick reply.
I have some other ideas for you to consider. Based on your test data, I think a pie chart would be a good option for you. You can visualize the various percentages.
If you want to display the most popular Activity name as a visual object of the card then you can create measures.
Measure = COUNT('classes delivered in 2023'[Activity name])Measure 2 = var _table=SUMMARIZE(ALL('classes delivered in 2023'),[Activity name],"count",[Measure]) var _max= MAXX(_table,[count]) RETURN MAXX(FILTER(_table,[count]=_max),[Activity name])Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thank you for your reply.
Here is sample data:
1. classes with codes
| Class code | Activity name | Course fee in $ | Consultants | Live/virtual |
| LC-2438 | English | $ 50,00 | XY | Live Classroom Instruction |
| LC-6323 | French | $ 50,00 | XY1 | Live Classroom Instruction |
| LC-7218 | German | $ 50,00 | XY3 | Live Classroom Instruction |
| LC-7266 | Spanish | $ 50,00 | XY4 | Live Classroom Instruction |
| LC-7058 | Italian | $ 50,00 | XY4 | Live Classroom Instruction |
| LC-6261 | Chinese | $ 50,00 | XY6 | Virtual Classroom Instruction |
| LC-6788 | Arabic | $ 50,00 | XY7 | Virtual Classroom Instruction |
| LC-7267 | Russian | $ 50,00 | XY8 | Virtual Classroom Instruction |
| LC-6330 | Portugese | $ 50,00 | XY9 | Virtual Classroom Instruction |
| LC-6677 | Dutch | $ 50,00 | XY3 | Virtual Classroom Instruction |
2. classes delivered in 2023
| Activity name | Class Sub-Code | Type | Start Date | Enrolled | Male | Female |
| English | LC-2438-19 | Live Classroom Instruction | 19.09.2023 | 15 | 10 | 5 |
| English | LC-2438-13 | Live Classroom Instruction | 25.01.2023 | 20 | 8 | 12 |
| English | LC-2438-14 | Live Classroom Instruction | 1.10.2023 | 19 | 9 | 10 |
| English | LC-2438-15 | Live Classroom Instruction | 1.11.2023 | 6 | 2 | 4 |
| English | LC-2438-16 | Live Classroom Instruction | 13.02.2023 | 7 | 3 | 4 |
| English | LC-2438-17 | Live Classroom Instruction | 27.06.2023 | 16 | 8 | 8 |
| English | LC-2438-18 | Live Classroom Instruction | 9.12.2023 | 19 | 9 | 10 |
| English | LC-6966-20 | Live Classroom Instruction | 30.10.2023 | 32 | 20 | 12 |
| French | LC-6323-12 | Live Classroom Instruction | 24.03.2023 | 15 | 5 | 10 |
| French | LC-6323-13 | Live Classroom Instruction | 22.06.2023 | 18 | 9 | 9 |
| French | LC-6323-14 | Live Classroom Instruction | 11.08.2023 | 23 | 11 | 12 |
| German | LC-7218-8 | Live Classroom Instruction | 3.02.2023 | 36 | 16 | 20 |
| German | LC-7218-9 | Live Classroom Instruction | 21.09.2023 | 19 | 8 | 11 |
| Spanish | L-7266-10 | Live Classroom Instruction | 4.06.2023 | 12 | 6 | 6 |
| Spanish | LC-7266-11 | Live Classroom Instruction | 9.09.2023 | 14 | 6 | 8 |
| Spanish | LC-7266-12 | Live Classroom Instruction | 3.11.2023 | 23 | 11 | 12 |
| Italian | LC-7058-1 | Live Classroom Instruction | 28.04.2023 | 20 | 9 | 11 |
| Italian | LC-7058-2 | Live Classroom Instruction | 10.06.2023 | 15 | 9 | 6 |
| Italian | LC-7058-3 | Live Classroom Instruction | 28.10.2023 | 13 | 6 | 7 |
| Chinese | LC-6261-22 | Virtual Classroom Instruction | 14.06.2023 | 13 | 7 | 6 |
| Chinese | LC-6261-23 | Virtual Classroom Instruction | 19.09.2023 | 20 | 10 | 10 |
| Chinese | LC-6261-24 | Virtual Classroom Instruction | 13.11.2023 | 12 | 7 | 5 |
| Arabic | LC-6788-7 | Virtual Classroom Instruction | 4.06.2023 | 9 | 4 | 5 |
| Arabic | LC-6788-8 | Virtual Classroom Instruction | 19.09.2023 | 10 | 5 | 5 |
| Arabic | LC-6788-9 | Virtual Classroom Instruction | 23.10.2023 | 12 | 7 | 5 |
| Arabic | LC-6788-10 | Virtual Classroom Instruction | 24.11.2023 | 12 | 5 | 7 |
| Russian | LC-7058-11 | Virtual Classroom Instruction | 24.03.2023 | 7 | 3 | 4 |
| Russian | LC-7058-12 | Virtual Classroom Instruction | 22.06.2023 | 8 | 3 | 5 |
| Portugese | LC-6330-4 | Virtual Classroom Instruction | 9.09.2023 | 5 | 1 | 4 |
| Dutch | LC-6677-2 | Virtual Classroom Instruction | 3.02.2023 | 6 | 3 | 3 |
I have same date for other years.
I am interested to see what course were most popular, gender distribution, which format was most popular, which consultant was engaged the most, etc..
Thanks in advance.
- Anonymous2 years agoNot applicable
Hola MPG1907. Recomiendo que crees dos consultas adicionales.
La primera, una consulta que sea Class code, para poder relacionar con Class Sub-Code, debes quitarle los numeros a partir del guion medio.
Y la segunda tabla, es la tabla calendario. Con este formula DAX la puedes crear:
TablaCalendario =VAR T_Calendario =ADDCOLUMNS(CALENDARAUTO(),"Año", YEAR([Date]),"Semestre", "Semes. " & CEILING(MONTH([Date])/6, 1),"Cuatrimestre", "Cuatr. " & CEILING(MONTH([Date])/4, 1),"Trimestre", "Trim. " & CEILING(MONTH([Date])/3, 1),"Bimestre", "Bim. " & CEILING(MONTH([Date])/2, 1),"Mes Número", MONTH([Date]),"Mes Nombre", FORMAT([Date], "MMMM"),"Semana", "Sem. " & WEEKNUM([Date], 2), -- El número 2 indica que la semana comienza en lunes"Día Número", WEEKDAY([Date],2),"Día Nombre", FORMAT([Date], "dddd"))RETURNT_CalendarioSi está satisfecho con esta respuesta, márquela como solución para que otros la encuentren.