Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to add a custom column, after loading an Excel file to Power BI, so that I can define a number of IF conditions, which depend on existing columns.
(For example: if "Employee number greater than 50" and "Employee name contains ###" and "Work start date greater than 1/1/2022" .... then ....)
Solved! Go to Solution.
@RafaelAri , In DAX you can use Switch or if, power query you can use if then else
if([employee number] > 50 && containsstring([employee name], "ABC" ) && [Work Start Date] > date(2022,1,1) ,1 ,0 )
You can try Search or find too
SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45
Thanks Steve
@RafaelAri , In DAX you can use Switch or if, power query you can use if then else
if([employee number] > 50 && containsstring([employee name], "ABC" ) && [Work Start Date] > date(2022,1,1) ,1 ,0 )
You can try Search or find too
SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45
Hello @RafaelAri,
Just to add on to amitchandak's answer, in case you're unclear on how to create a new column.
1. Go to the Data view, using the icon on the far left.
2. In the ribbon, under Column tools, click the "New column" button.
3. Enter the DAX formula in the formula bar.
Please see the screenshots below:
-Steve
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |