Forum Discussion
ahhollan
5 years agoHelper I
Simple if(format syntax question
I have a column with values of Non-Covid and Covid. If the value is Covid, the fiscal year needs to be formatted and populated based on the Scheduled Start column. If the value is Non-Covid, the fisc...
- 5 years ago
If this is a calculated column in a table, try:
Fiscal Month/Yr = IF( '2700 WO Listing'[Covid vs Non-Covid (groups)]="Non-Covid", FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"), FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy") )If you are using this in a measure, try:
Fiscal Month/Yr = IF( MAX( '2700 WO Listing'[Covid vs Non-Covid (groups)]) = "Non-Covid", FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"), FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy") )
PaulDBrown
5 years agoCommunity Champion
If this is a calculated column in a table, try:
Fiscal Month/Yr = IF(
'2700 WO Listing'[Covid vs Non-Covid (groups)]="Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)
If you are using this in a measure, try:
Fiscal Month/Yr = IF(
MAX( '2700 WO Listing'[Covid vs Non-Covid (groups)]) = "Non-Covid",
FORMAT('2700 WO Listing'[Reported Date],"MMM-yyyy"),
FORMAT('2700 WO Listing'[Scheduled Start],"MMM-yyyy")
)