Forum Discussion
Jonjon_99
Helper I
2 years agoPOWER BI DAX IF STATEMENT
hi, i would like to create new column/DAX formula that will return my Product to "Others". this is the sample if the product = Montana, Paseo, Velo and VTT it will be tag as Others TIA! joh...
- 2 years ago
then it’s better for you to create a table with the names of the products in an Excel file and upload it to power bi
and then you can update the list at any time
----Measure = IF(MAX('yourtabl[product]) in VALUES('tablePro[Product]), "Others", MAX('yourtabl[product]))
Ahmedx
Super User
2 years agopls try this
Measure = IF(MAX('yourtabl[product]) in {Montana, Paseo, Velo, VTT}, "Others", MAX('yourtabl[product]))
-----
Column = IF('yourtabl[product] in {Montana, Paseo, Velo, VTT}, "Others", 'yourtabl[product])- Jonjon_992 years ago
Helper I
thanks for this Ahmedx , what if my product ID is more than 100 lines that i need to tag as "Others", what is the best measure to use? 🙂
- Ahmedx2 years ago
Super User
then it’s better for you to create a table with the names of the products in an Excel file and upload it to power bi
and then you can update the list at any time
----Measure = IF(MAX('yourtabl[product]) in VALUES('tablePro[Product]), "Others", MAX('yourtabl[product]))
- Jonjon_992 years ago
Helper I
will check it. thanks!