Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rocha2001
New Member

Convert Excel formula to DAX

Hi, 

As I'm fairly new to Power BI I have a formula in Excel which I would like some help on how to use in Power BI, please.    The formula is as follows: 

 

=IF(AND(Family="#";Cod pos="3400100";C cost="14000G";OR(LEFT(Text;3)="Ana";LEFT(Text;3)="RAP"));"RAPPEL";

IF(AND(Family="#";Cod pos="3400100";C cost="14000G");"Present";

IF(OR(AND(Family="#";Cod pos="3401001");AND(Family="#";Cod pos="3401003");AND(Family="#";Cod pos="3400100";C cost="140TC"));"Store";

IF(AND(Family="#";Cod pos="3400100";VALUE(C cost)>0);"RAPPEL";IF(AND(Family="#";Cod pos="3301001");"MOV";

IF(OR(VALUE(Family)=197;VALUE(Family)=198);"MOV";

IF(VALUE(Family)<=196;"Store";"")))))))

 

Thank you all!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Rocha2001 , with correct column names try with Switch

 

Switch(True() ,
([Family]="#" && [Cod pos]="3400100" && [cost]="14000G" && (LEFT([Text];3) ="Ana" || LEFT([Text];3)="RAP") ) ;"RAPPEL" ;
[Family]="#" && [Cod pos]="3400100" && [cost]="14000G";"Present";
//Add otherconditions

"" //Default value
)

 

Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Rocha2001 , with correct column names try with Switch

 

Switch(True() ,
([Family]="#" && [Cod pos]="3400100" && [cost]="14000G" && (LEFT([Text];3) ="Ana" || LEFT([Text];3)="RAP") ) ;"RAPPEL" ;
[Family]="#" && [Cod pos]="3400100" && [cost]="14000G";"Present";
//Add otherconditions

"" //Default value
)

 

Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.