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.
Hi,
the table of data is on screen schoot. The objectif is to calculate the number of rows Ok and Ko where
* Step S1,S2,S3
OK= Status 1,2,3
and KO =status 4
* Step S4
OK= Status 1
and KO =status 2,3,4
Is it possible to send if condition with count Row ?
thanks
Solved! Go to Solution.
Hi @POWER_MI ,
You can try this.
Column =
SWITCH (
TRUE (),
'Table'[Step] IN { 1, 2, 3 }
&& 'Table'[COLOR] IN { "R", "G", "O" }, "R1",
'Table'[Step] IN { 1, 2, 3 }
&& 'Table'[COLOR] IN { "GR", "O", "Y" }, "R2",
'Table'[Step] IN { 4, 5 }
&& 'Table'[COLOR] IN { "GR", "O", "Y" }, "R3",
"Unknown"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @POWER_MI ,
I am not very much clear on what you are trying to asking.
Can you simply create a sample input and sample output for your requirement?
Thanks,
Pragati
Hi all,
than,ks for feed back sorry if it's not clear, will try to re explain it.
the table is updated.
The asking is to have if or DAX conditions with if .... to deploy this condition
The status Ok or KO depend on our scheduling if we are on step 1, 2 , 3 we can arange statuts of color Green and Orange to OK
but after and on step 4 Orange will be KO because it's critiqual step SO OK = Green, and Orange and RED=KO
Condition
So the objectif is to create new colonne and in this colon we will have like value OK or KO.
Condition is
Table (colonne Step) & same table ( Color) : condition between this two colonne :
If we are on step 1 or 2 or 3 the ORANGE and GREEN Means Status OK and RED means KO
If we are on step 4 the GREEN Means Status OK. Orange and RED means KO
HI @POWER_MI ,
See if this works.
Create a new Column
Column = SWITCH(
TRUE(),
('Table'[Step] = 4 && 'Table'[Color] IN {"ORANGE","RED"}) || ('Table'[Step] IN {1,2,3} && 'Table'[Color] = "RED") , "KO",
"OK"
)
Regards,
HN
Hello harshnathani thanks for your answer. It's not far i tried to make it on picture may be it's will be clean in same Switch condition we will have more conditions and the value at the last. i make example with color to understand
Hi @POWER_MI ,
Can you share all the conditions and sample data in text format with the expected output.
Very difficult to understand the requirement from the picture.
Regards,
HN
Hi all
@harshnathani thanks for answer
this is text condition
Column = SWITCH(
TRUE(),
(
'Table'[Step] IN {1,2,3} && 'Table'[COLOR] IN {"R","G","O"} ||
'Table'[Step] IN {1,2,3} && 'Table'[COLOR] IN {"GR","O","Y"} ||
'Table'[Step] IN {4,5} && 'Table'[COLOR] IN {"GR","O","Y"} ,
"R1",
"R2",
"R3",
"Unknow"
)
If table step = 1,2,3 and color is R,G,O value will be R1
If table step = 1,2,3 and color is GR,O,Y value will be R2
If table step = 3,4 and color is GR,O,Y value will be R3
else unknow
thanks
Hi @POWER_MI ,
You can try this.
Column =
SWITCH (
TRUE (),
'Table'[Step] IN { 1, 2, 3 }
&& 'Table'[COLOR] IN { "R", "G", "O" }, "R1",
'Table'[Step] IN { 1, 2, 3 }
&& 'Table'[COLOR] IN { "GR", "O", "Y" }, "R2",
'Table'[Step] IN { 4, 5 }
&& 'Table'[COLOR] IN { "GR", "O", "Y" }, "R3",
"Unknown"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
can you see this ? it's suite of this if condition thanks
https://community.powerbi.com/t5/Desktop/Switch-condition-adding-color-on-rows/m-p/1477021#M615140
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 |
---|---|
99 | |
98 | |
76 | |
66 | |
59 |
User | Count |
---|---|
142 | |
106 | |
103 | |
85 | |
70 |