The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |