Forum Discussion

PowerBinewbie19's avatar
PowerBinewbie19
New Member
2 years ago

Data Type in column (Text vs Whole Number)

Hi there, 

 

I have 3 columns and I have the following formulas for each in PowerBI Table View:

Column 1: Column 1 = IF(('Sharepoint List'[Completed Date]-'Sharepoint List'[Date reported])> 0, CONVERT(NETWORKDAYS('Sharepoint List'[Date reported],'Sharepoint List'[Completed Date]),STRING),"WIP")

 

Column 2: Column 2 = IF(ISBLANK('Sharepoint List'[Completed Date]),"WIP",IF('Sharepoint List'[SLA Baseline]>='Sharepoint List'[Column 1],"Yes", "No"))

 

Column 3: SLA Baseline column 


*For Column 1, I want it's Data Type to be "Whole Number" but because of the "WIP" wording in the false part of the formula, I have to change the data type of the column to "Text". Is there another way to do this while keeping it as a whole number column?

 

*For Column 2, I want this to be a Text column since "Yes", "No" and "WIP" are the entries I want visible. However, when all 3 columns (Column 1, Column 2, and SLA Baseline) are all Text fields, I get no error and I get a result BUT it's incorrect because this column cannot tell which is greater (Column 1 or SLA Baseline) since they're text fields instead of whole number.

*Also, when I change the SLA baseline Column from Text to Whole number or vice versa it works well so this is good!

2 Replies