Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 users to select either Field A or Field B, and then choose between "Yes" or "No." In this case we are selecting a No in the calculation.
I'm trying to write a calculation as follows:
CountRowsNum =
COUNTROWS(
FILTER(
TableName,
TableName[AnotherFlag] = "N" && SELECTEDVALUE('Parameter[OTF]') = "N"
)
)
The goal is to count rows where "AnotherFlag" is 'N' and the selected OTF is also 'N,' while allowing users to switch between Field A and Field B.
Thanks
Aj
Solved! Go to Solution.
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()
)
)
)
Hi @batman ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution.
If it doesn't resolve, please provide sample data. We can better understand the problem and help you.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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()
)
)
)
That seems to work, Thank you
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 18 | |
| 14 | |
| 14 |