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
BobKoenen
Helper IV
Helper IV

Multiply value if other value =X

powerbiQQ.PNG

Hi all,

 

I am relatively new and hope you guys can help me out with how to do this in DAX I want a column Amount filled as followed.

If HourCode = 389998 then Hours * 60 in the column Amount.  How can i do this?

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @BobKoenen

 

The code for your amount Column:

        IF(Table1[HourCode]=389998; Table1[Hours]*60)

if Table1[HourCode] is a number, or 

       IF(Table1[HourCode]="389998"; Table1[Hours]*60)

if Table1[HourCode] is text

 

Substitute Table1 with the name of your table

View solution in original post

1 REPLY 1
AlB
Super User
Super User

Hi @BobKoenen

 

The code for your amount Column:

        IF(Table1[HourCode]=389998; Table1[Hours]*60)

if Table1[HourCode] is a number, or 

       IF(Table1[HourCode]="389998"; Table1[Hours]*60)

if Table1[HourCode] is text

 

Substitute Table1 with the name of your table

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.