Forum Discussion
nabilassellalou
2 years agoRegular Visitor
DAX
I have a data table on several columns, I want to count the number of "yes" rows for a single M1 and M4 (another column) for the same identifier because there are several M1 and M4 which are repeated...
- 2 years ago
Hi nabilassellalou ,
Assuming you want to count the rows in Moment Mains that contain M1 or M4 and which value in Confirmite Mains is Oui (as you did not provide a sample result), try this formula. Replace M1 with M4 if computing for M4.
M1 = CALCULATE ( COUNTROWS ( Feuil1 ), FILTER ( ALLEXCEPT ( Feuil1, Feuil1[ID] ), CONTAINSSTRING ( Feuil1[Moment mains], "M1" ) && Feuil1[Conformité mains] = "Oui" ) )
danextian
2 years agoSuper User
Hi nabilassellalou ,
Assuming you want to count the rows in Moment Mains that contain M1 or M4 and which value in Confirmite Mains is Oui (as you did not provide a sample result), try this formula. Replace M1 with M4 if computing for M4.
M1 =
CALCULATE (
COUNTROWS ( Feuil1 ),
FILTER (
ALLEXCEPT ( Feuil1, Feuil1[ID] ),
CONTAINSSTRING ( Feuil1[Moment mains], "M1" )
&& Feuil1[Conformité mains] = "Oui"
)
)
nabilassellalou
2 years agoRegular Visitor
Thank you, it's done.