Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I'm having some trouble with a string text column I have, its called: "Task Status" within Task status there are some blank values
Column:
Complete
Not Started
In Progress
Etc,
I followed some guides online and they are mostly geared up to creating measures of which the column needs to be numeric value to work, but I can't figure out how to pull a "0" for the count of a blank text string.
Can anyone help?
Thanks,
Solved! Go to Solution.
Try this -
Task Status Measure =
IF(
ISBLANK(SELECTEDVALUE('Table'[Task Status])),
0,
SELECTEDVALUE('Table'[Task Status])
)
Proud to be a Super User! | |
Hi @stevenlong85 ,
Use the following DAX formula to create a measure that counts blank values:
Count_Blank_Status =
CALCULATE(
COUNTROWS('TableName'),
ISBLANK('TableName'[Task Status])
)
If You Want to Replace Blanks with "0" or Another Default Value create a New Calculated Column in your table with this DAX formula:
Task_Status_Filled =
IF(
ISBLANK('TableName'[Task Status]),
"0", -- Replace with any value you want
'TableName'[Task Status]
)
Also you can replace the Blank Values (null values) in power query:
1- Go to power query, select the disered column, and choose replace values:
2- Now in Value to find keep blank and in replace with choose 0:
Now you can close and apply.
Try this -
Task Status Measure =
IF(
ISBLANK(SELECTEDVALUE('Table'[Task Status])),
0,
SELECTEDVALUE('Table'[Task Status])
)
Proud to be a Super User! | |
WOW! super fast response and this worked perfectly!
User | Count |
---|---|
84 | |
79 | |
71 | |
48 | |
43 |
User | Count |
---|---|
111 | |
54 | |
50 | |
40 | |
40 |