Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have the following data in a table:
UserName isValid
A yes
A no
A yes
B yes
B yes
B yes
I would like a measure that would respond "NOT VALID" for A and "VALID" for B. Basically, any of the "isValid" = no, then "NOT VALID"....
I hope I'm asking this right....
Hi @bstock ,
Please use below measure to achive this request.
Measure:
Is_Valid = IF(
COUNTROWS(
FILTER('Sample','Sample'[isValid]="No")
)>0,"Not Valid"
,"Valid")
Output:
Best Regards,
Mail2inba4
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bstock ,
Column =
SWITCH(
Sheet12[isVaild],
"yes", "vaild",
"no", "Not vaild"
)
Column 2 =
IF(
Sheet12[Name] = "A" && Sheet12[isVaild] = "no" || (Sheet12[Name] = "B" && Sheet12[isVaild] = "yes"),
"XXX",
BLANK()
)
Measure1 =
VAR x=
CALCULATE(
COUNT(Sheet12[isVaild]),
FILTER(
Sheet12,
Sheet12[Name] = "A" && Sheet12[Column] = "Not vaild"
)
)
VAR y=
CALCULATE(
COUNT(Sheet12[isVaild]),
FILTER(
Sheet12,
Sheet12[Name] = "B" && Sheet12[Column] = "vaild"
)
)
RETURN
IF(
x >0 || y > 0,
COUNT(Sheet12[isVaild])
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ok, so I came up with this:
It seems to work as I would have wanted, just curious if there is maybe a better or more flexible way to accomplish this?
isQualified =
if (
COUNTROWS(
FILTER(
userQuals,
userQuals[IsQualified] = "FALSE"
)
) > 0,
"FALSE", "TRUE"
)
Instead of COUNTROWS > 0 you could also use ISEMPTY. If your table is large, this might be more efficient as the lines aren't actually counted this way. Like this:
IF (
ISEMPTY (
FILTER(
userQuals,
userQuals[IsQualified] = "FALSE"
)
),
"TRUE",
"FALSE"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |