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.
Hi all, I have created a column that looks up the Customer Group column and returns true/false if any customer within that group has purchased (even if only one or two purchased).
My formula seems to work fine apart from it returning TRUE when the Group column is Blank (it is definitely blank, I tried Trimming and Cleaning it in Query Editor). This column has to remain blank also.
I would like it to return FALSE if that column is blank. Any ideas?
IsGroupCustomer =
VAR _min =
CALCULATE (
COUNTROWS(FILTER('table', 'table'[Purchase])),
FILTER (
'table',
'table'[Customer Group] = EARLIER('table'[Customer Group])
&& NOT(ISBLANK('table'[Customer Group]))
)
)
RETURN
IF (ISBLANK('table'[Customer Group]), FALSE(), IF ( _min > 0, TRUE(), FALSE()))
Solved! Go to Solution.
this shall also work:
IsGroupCustomer =
VAR _condition1 =
COUNTROWS(
FILTER(
TableName,
TableName[Customer Group] = EARLIER(TableName[Customer Group])
&&TableName[Purchase]
)
)>=1
VAR _condition2 =
TableName[Customer Group]<>BLANK()
RETURN
IF(
_condition1&&_condition2,
TRUE, FALSE
)
this shall also work:
IsGroupCustomer =
VAR _condition1 =
COUNTROWS(
FILTER(
TableName,
TableName[Customer Group] = EARLIER(TableName[Customer Group])
&&TableName[Purchase]
)
)>=1
VAR _condition2 =
TableName[Customer Group]<>BLANK()
RETURN
IF(
_condition1&&_condition2,
TRUE, FALSE
)
That worked a treat, thanks very much!
hi @adam_macs
try like:
IsGroupCustomer =
VAR _condition1 =
COUNTROWS(
FILTER(
TableName,
TableName[Customer Group] = EARLIER(TableName[Customer Group])
&&TableName[Purchase]=TRUE
)
)>=1
VAR _condition2 =
TableName[Customer Group]<>BLANK()
RETURN
IF(
_condition1&&_condition2,
TRUE, FALSE
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |