Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I want to create a measure to display 0 if a specified field for a record is blank, and 1 if it is not blank. I want to show this for each record. I think this might be better as a column, but if I can do it as a measure that is preferred as I dont have direct edit access to the model to add a column.
I tried the below, but it tells me the resources exceeded
Hello @astano05,
The SELECTEDVALUE method expects a scalar result to be returned, however it is being used in a context that produces many values, which is why you are receiving a resource exceeded error. You can use the IF function in its place to get around this problem.
Can you try this:
Measure =
IF(
ISBLANK(MAX(Contacts[Email])),
0,
1
)
This measurement determines if the Email column's maximum value in the current context is blank. The measure returns 0 if it is, while returning 1 otherwise.
Good nigth man,
So, to do this the best way is in a column because do you need a value to every line.
Try two ways:
Column
Way1 = if(Contacts[Email] is blank, 0,1)
measure
Way2 =
var email = SELECTEDVALUE(Contacts[Email])
var test = if(email is blank,0,1)
return test
Please tell us the result!
Thank you for responding!
The measure doesn't give me the result I'm looking for, it returns a 0 for every value.
Good morning, so, the value Contacts[Email] is blank in all rows?
Can you send a print or a video?
User | Count |
---|---|
97 | |
85 | |
77 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |