Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
19 | |
13 | |
11 | |
7 |