# 8.5 Conditional Column

Source: https://ravindrabagale.com/mr/powerbi/ch08-adding-columns-power-query-add-column-tab-and/8-5-conditional-column.html
Language: mr (Marathi with English technical terms)

Code न लिहिता if–then–else logic बनवता येतं. Basket Size चं sample पाहू:

Add Column › Conditional Column › नाव Basket Size.

Amount < 199 तर Small.

पुढचा clause Amount < 499 तर Medium.

बाकी Large.

Text columns साठी begins with, contains, equals; numeric columns साठी greater / less than असे operators मिळतात. ABC123 dropdown वापरून value किंवा output मध्ये दुसरा column / parameterही निवडता येतो.

Amount हा line amount असेल तर result line-value band आहे. पूर्ण basket size म्हणायचं असेल तर आधी प्रत्येक order चा total तयार करा.

रवींद्र बागले यांची tip

पहिली जुळलेली condition वापरली जाते. <499 आधी लिहिलं तर <199 सुद्धा Medium होईल. 198, 199, 498, 499 आणि null या boundaries तपासा.
