Hi,
I need to create a blank alias for records containing "TBD" in an existing column. I keep creating a new column for this condition by accident. Can anyone provide insight as to how to create a conditional alias without an IIf statement?
Hi,
I need to create a blank alias for records containing "TBD" in an existing column. I keep creating a new column for this condition by accident. Can anyone provide insight as to how to create a conditional alias without an IIf statement?
Not sure how did you keep creating new columns. did you use IIF statement?
Did you use VBA code to create a new column?
No VBA written in this workbook. Code is below.
SELECT [Budget Analysis 2011-NEW_Complex].Manager,[Budget Analysis 2011-NEW_Complex].VendorProject,Sum([Budget Analysis 2011-NEW_Complex].Jan) AS January,Sum([Budget Analysis 2011-NEW_Complex].Feb) AS February,Sum([Budget Analysis 2011-NEW_Complex].Mar) AS March,Sum([Budget Analysis 2011-NEW_Complex].Apr) AS April,Sum([Budget Analysis 2011-NEW_Complex].M) AS May,Sum([Budget Analysis 2011-NEW_Complex].Jun) AS June,Sum([Budget Analysis 2011-NEW_Complex].Jul) AS July,Sum([Budget Analysis 2011-NEW_Complex].Aug) AS August,Sum([Budget Analysis 2011-NEW_Complex].Sept) AS September,Sum([Budget Analysis 2011-NEW_Complex].Oct) AS October,Sum([Budget Analysis 2011-NEW_Complex].Nov) AS November,Sum([Budget Analysis 2011-NEW_Complex].Dec) AS December
FROM[Budget Analysis 2011-NEW_Complex]
WHERE BudgetWorkbook="BITN306" AND Type="Project Labor"
GROUP BY[Budget Analysis 2011-NEW_Complex].BudgetWorkbook, [Budget Analysis 2011-NEW_Complex].Manager, [Budget Analysis 2011-NEW_Complex].VendorProject;
I'd like to create a condition where if Manager is "TBD", TBD reports as a blank (no text).
The IIf statment I tried (not in code above) created new columns and that isnt what I need.
I see.
you can change a little bit in you query as following, then the column name will stay as Manager.
SELECT iif([Budget Analysis 2011-NEW_Complex].Manager ="TBD","",[Budget Analysis 2011-NEW_Complex].Manager) as Manager, [Budget Analysis 2011-NEW_Complex].VendorProject .....