Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
106 | |
88 | |
74 | |
69 |
User | Count |
---|---|
123 | |
112 | |
95 | |
83 | |
73 |