Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

If and DAX Measure error

Hi Experts

 

Getting an erorr with the following if measure (second if step)

Elasped RAG Status = IF(FACTNEWBI_IncidentAudit[Elapsed Time] >24, "Red", IF(FACTNEWBI_IncidentAudit[Elapsed Time] >=12 && <24, "Amber","")
  • Try the following. I think you were missing a bracket at the end and needed to give a specifc column after the &&

    IF(
    	FACTNEWBI_IncidentAudit[Elapsed Time] >24, 
    	"Red", 
    	IF(
    		FACTNEWBI_IncidentAudit[Elapsed Time] >= 12 && FACTNEWBI_IncidentAudit[Elapsed Time] < 24, 
    		"Amber",
    		BLANK()
    	)
    )

1 Reply

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Try the following. I think you were missing a bracket at the end and needed to give a specifc column after the &&

    IF(
    	FACTNEWBI_IncidentAudit[Elapsed Time] >24, 
    	"Red", 
    	IF(
    		FACTNEWBI_IncidentAudit[Elapsed Time] >= 12 && FACTNEWBI_IncidentAudit[Elapsed Time] < 24, 
    		"Amber",
    		BLANK()
    	)
    )