Forum Discussion
mariomyhanh
Helper I
3 years agoDax if/then divide statement
Please help, i'm fairly new to DAX and I am trying create a measure to look at a column ([Level 2]) in a table ('COA Structure') that contains "Total Operating Expense" then apply this division formu...
- 3 years ago
mariomyhanh
Please try= VAR Result = DIVIDE ( [Variance], [Budgets] ) RETURN SWITCH ( SELECTEDVALUE ( 'COA Structure'[Level 2] ), "Total Operating Expense", IFERROR ( - Result, -1 ), "Total Operating Revenue", IFERROR ( Result, 1 ), Result )
FreemanZ
Super User
3 years agoAre Variance and Budgets columns or measures?
- mariomyhanh3 years ago
Helper I
Hello FreemanZ, Variance and Budgets are measures.