Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I ma trying to use COUNTAX for the first time but I ma getting the following error:
The end of the input was reached
The goal of this formula is to determine the turn (either "Diurno" or "Nocturno") for a given date and operator, based on the number of tasks assigned to that operator for that date.
Then, the formula uses the "IF" function to compare the count of tasks assigned to the operator for a given date, where the turn is "Diurno", to the count of tasks assigned to the operator for the same date, where the turn is "Nocturno Mañana" or "Nocturno Tarde".
If the count of tasks assigned for the "Diurno" turn is greater than the count of tasks assigned for the "Nocturno Mañana" or "Nocturno Tarde" turn, the formula returns "Diurno". Otherwise, it returns "Nocturno".
In summary, the formula calculates the number of tasks assigned to a specific operator for a given date, and based on this count, returns the turn (either "Diurno" or "Nocturno") for that operator on that date.
Does anyone has an idea of where the error can be from?
Solved! Go to Solution.
Hi !
Unfortunately it did not work but I find a solution that I post below in case someone might need it. Thank you !
Instead of COUNTAX and VAR I used EARLIER():
COUNTROWS(
FILTER(
TareasXOperariosXCias,
EARLIER(TareasXOperariosXCias[UNIDAD_TEMPORAL])=TareasXOperariosXCias[UNIDAD_TEMPORAL]
&&
EARLIER(TareasXOperariosXCias[OPERARIO])=TareasXOperariosXCias[OPERARIO]
&&
EARLIER(TareasXOperariosXCias[Actividad])=TareasXOperariosXCias[Actividad]
&&
TareasXOperariosXCias[TURNO_DETALLADO] = "Nocturno Mañana"
)
)
Maybe parenthesis almost in the end after
Nocturno Tarde")
Turno =
VAR curFecha = TareasXOperariosXCias[Fecha real]
var curOperario = TareasXOperariosXCias[OPERARIO]
RETURN
IF(
CALCULATE(
COUNTAX(
TareasXOperariosXCias,
FILTER(
TareasXOperariosXCias,
curFecha = TareasXOperariosXCias[Fecha real]
&&
curOperario = TareasXOperariosXCias[OPERARIO]
&&
(TareasXOperariosXCias[TURNO_DETALLADO] = "Diurno")
)
)
)
>
CALCULATE(
COUNTAX(
TareasXOperariosXCias,
FILTER(
TareasXOperariosXCias,
curFecha = TareasXOperariosXCias[Fecha real]
&&
curOperario = TareasXOperariosXCias[OPERARIO]
&&
(TareasXOperariosXCias[TURNO_DETALLADO] = "Nocturno Mañana" || TareasXOperariosXCias[TURNO_DETALLADO] = "Nocturno Tarde")
)
)
),
"Diurno",
"Nocturno"
)
Hi !
Unfortunately it did not work but I find a solution that I post below in case someone might need it. Thank you !
Instead of COUNTAX and VAR I used EARLIER():
COUNTROWS(
FILTER(
TareasXOperariosXCias,
EARLIER(TareasXOperariosXCias[UNIDAD_TEMPORAL])=TareasXOperariosXCias[UNIDAD_TEMPORAL]
&&
EARLIER(TareasXOperariosXCias[OPERARIO])=TareasXOperariosXCias[OPERARIO]
&&
EARLIER(TareasXOperariosXCias[Actividad])=TareasXOperariosXCias[Actividad]
&&
TareasXOperariosXCias[TURNO_DETALLADO] = "Nocturno Mañana"
)
)
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
43 | |
21 | |
21 | |
14 |
User | Count |
---|---|
124 | |
42 | |
39 | |
28 | |
24 |