Forum Discussion
Want to replace 0 wherever there is no data while creating a calculated column
Test Users who view or edit =
I've tried using the above formula but i'm unable to get the exact result.
Let me know if there any other alternateway to achive 0 for blank or no data.
10 Replies
- MahyarTF
Memorable Member
Hi,
What is the datatype for [ID_Tool] and [N_ViewedOrEditedFileCount] and also are the column or measure ?
would you please share the sample data for the empty line here ?
- Rajkumar07
Helper I
Hi,
[ID_Tool] and [N_ViewedOrEditedFileCount] both columns are whole number.
I've created a calculated column with the help of if condition to achive the kpi condition.
Is there a way to replace 0 if there is no data?- MahyarTF
Memorable Member
Hi Rajkumar07 ,
As the columns are the number type it should work.
Would you please create the table visual that is included the [ID_Tool], [N_ViewedOrEditedFileCount], and [Test Users who view or edit] fields to clarify the records with null value for the particular column
- v-zhangti
Community Support
Hi, Rajkumar07
I have no problem testing with your formula.
What are the difficulties you are experiencing?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Rajkumar07
Helper I
Hi Team,
Could you please confirm the above tested function its a measure or calculated column?
When i'm trying to created a calculated column with the above formula I'm unable to get the expected result.
The reason "IF" condition it's checked everything in the firstline it self. Then it will not come and check in the return function. This is my understanding.- v-zhangti
Community Support
Hi, Rajkumar07
My test is a calculated column. Can you provide sample data for [ID_Tool] and [N_ViewedOrEditedFileCount]?
Best Regards
- Rajkumar07
Helper I
Hi Team,
Thank for your quick response,
I would like you inform you this, this how i'm having the data set and the sample data is given below
Wherever there is no data for the period I want to replace with 0.
Is that possible to get the result. Please advice.- v-zhangti
Community Support
Hi, Rajkumar07
Measure:
Test Users who view or edit = var x = IF(SELECTEDVALUE(FILE_ACTIVITY_F[Id no])=2 && SELECTEDVALUE(FILE_ACTIVITY_F[Users who view or edit])>0,1,0) return IF(ISBLANK(x),0,x)Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.