Power BI & Query

css navigation by Css3Menu.com

Using VAR in Calculations

We have all built those IF statements that go on and on and when you look back at it, you scratch your head. My friend taught me this Column thing using DAX. Ask the question, give it the answers for TRUE and finally if its FALSE.

Talk about embarrassing. I put the example in and uploaded my updates to the site. Next morning, I look at the new examples and the before was there. Never program in the middle of the night.

MO Type =
   VAR MOT =
	LEFT( qryMOemp[Manf],2)   Pick your test
RETURN	 Perform the test
	    TRUE (),	 What to do if TRUE
		MOT = "MO", "MO",
		MOT = "RW", "Rework",
		MOT = "SA", "Sample",
			"Other"	 Finally if none TRUE


Updated:  11/21/2018 19:24
This page added:  20 November 2018