Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table (Tabla_Radicados) I with the unique ID
ID_Radicado
7122
7123
7124
7125
And I have another table (Tabla_Datos) that among other columns has the following.
ID_Radicado Activity Result
7122 Attending Continue
7122 Attending Continue
7134 Attending Continue
7124 Attending Continue
7124 Attending Continue
7124 Attending Refuse
7124 No Attending Refuse
7125 Attending Complement
7125 Attending Continue
What I want to do is to créate, a column in Tabla_Radicados that Count the number of times an ID is repeated, fulfilling the following filters Activity = Attending and Result = Continue.
If that condition is equal to 0 then in the column leave 0
If that condition is equal to 1 then in the column leave 1
If that condition is equal to 2 then in the column leave 2
In Excel, it would be an IF() and a COUNTIFS()
=IF(COUNTIFS (Histórico!G:G;A4;Histórico!M:M;"Atender Solicitud";Histórico!N:N;"Complementar Información")=0;0;
IF (COUNTIFS (Histórico!G:G;A4;Histórico!M:M;"Atender Solicitud";Histórico!N:N;"Complementar Información")=1;1;
IF(COUNTIFS (Histórico!G:G;A4;Histórico!M:M;"Atender Solicitud";Histórico!N:N;"Complementar Información")=2;2;
How can I achieve that?
In DAX you use CALCULATE like this:
CALCULATE(COUNT([ID_Radicado],FILTER(Table_Datos,[Result]="Continue"))
Thanks, but what I really need is a new Column. For each Row I need the result (Count Id where Activity = Attending and Result = CAONTINUE).
Meaning:
ID_Radicado New Column
7122 0
7123 2
7124 1
Appreciate any help!
Thanx
OK, so that would be something like:
Column = COUNTX(FILTER(RELATEDTABLE(Tabla_Datos),[Activity]="Attending" && [Result]="Continue"),Tabla_Datos[ID_Radicado])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |