Forum Discussion

batman's avatar
batman
Icon for Helper I rankHelper I
1 year ago
Solved

Field Parameter assistance

Hello, I need some assistance with field paramters, I created a field parameter called "OTF," which essentially allows toggling between two flags with values of "Yes" and "No." I want to enable u...
  • Kedar_Pande's avatar
    1 year ago

    DAX calculation:

    CountRowsNum = 
    COUNTROWS(
    FILTER(
    TableName,
    TableName[AnotherFlag] = "N" &&
    SWITCH(
    TRUE(),
    SELECTEDVALUE('Parameter[OTF]') = "Field A", TableName[FieldA] = "N",
    SELECTEDVALUE('Parameter[OTF]') = "Field B", TableName[FieldB] = "N",
    FALSE()
    )
    )
    )