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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
maowi01
Frequent Visitor

Multiple Formulas in one Statement

Hi Team,

 I am trying to use multiple statements from Excel and convert to either a dax formula or a calculated column:

=IF(AB2="YES",SUM(X2/AC2),"0.00") 

the Columns are all within the same table.

I tried a calculate with and If and Sum.... Iferror with a Sumx ..... If , sum, filter..... No luck

Your advice and expertise, greatly appreciated

🙂

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You have not specified whether you need a calculated column or a measure.  If you need a calculated column formula, then try this

=if(Data[Reply]="Yes",divide(Data[column1],Data[column2]),0)

Data[Reply] is column AB

Data[column1] is X2

Data[column2] is AC2

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You have not specified whether you need a calculated column or a measure.  If you need a calculated column formula, then try this

=if(Data[Reply]="Yes",divide(Data[column1],Data[column2]),0)

Data[Reply] is column AB

Data[column1] is X2

Data[column2] is AC2

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur  THANK YOU

Lesson learnt- dont overthink the formula- Worked perfectly!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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