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
jendefig
Frequent Visitor

Conditional Calclated column help

Hello,

First post here.  Tried to find answer, but no luck.  I have a column labeled "Frequency" with entries of "Every Month"  "Every two weeks" and "Every week."  In addtion I have a revenue column named "Amount".

 

What I want to do is create a column for "Expected Monthly Revenue" where:

 

Expected Monthly Revenue = If Frequency = Every Month, then = Amount,

                                                If Frequency = Every two weeks, then = 2*Amount,

                                                If Frequency = Every week, then = 52*Amount/12

 

I have tried in the Query Editor with Conditional column, but couldn't put a formula for result.

 

Then I've tried with calculated column, but can't find the right DAX syntax to get down to the specific entries in "Frequency" column.

Many thanks in advance

 

1 ACCEPTED SOLUTION
jendefig
Frequent Visitor

Nevermind.  Got it! 🙂

Expected Monthly Revenue = IF(Table1[Frequency]="Every Month", Table1[Amount],IF(Table1[Frequency] = "Every 2 weeks",(26*Table1[Amount]/12),IF(Table1[Frequency] = "On the 1st & 15th",(2*Table1[Amount]),IF(Table1[Frequency] = "Every week", (52*Table1[Amount]/52)))))


@jendefig wrote:

Hello,

First post here.  Tried to find answer, but no luck.  I have a column labeled "Frequency" with entries of "Every Month"  "Every two weeks" and "Every week."  In addtion I have a revenue column named "Amount".

 

What I want to do is create a column for "Expected Monthly Revenue" where:

 

Expected Monthly Revenue = If Frequency = Every Month, then = Amount,

                                                If Frequency = Every two weeks, then = 2*Amount,

                                                If Frequency = Every week, then = 52*Amount/12

 

I have tried in the Query Editor with Conditional column, but couldn't put a formula for result.

 

Then I've tried with calculated column, but can't find the right DAX syntax to get down to the specific entries in "Frequency" column.

Many thanks in advance

 



View solution in original post

1 REPLY 1
jendefig
Frequent Visitor

Nevermind.  Got it! 🙂

Expected Monthly Revenue = IF(Table1[Frequency]="Every Month", Table1[Amount],IF(Table1[Frequency] = "Every 2 weeks",(26*Table1[Amount]/12),IF(Table1[Frequency] = "On the 1st & 15th",(2*Table1[Amount]),IF(Table1[Frequency] = "Every week", (52*Table1[Amount]/52)))))


@jendefig wrote:

Hello,

First post here.  Tried to find answer, but no luck.  I have a column labeled "Frequency" with entries of "Every Month"  "Every two weeks" and "Every week."  In addtion I have a revenue column named "Amount".

 

What I want to do is create a column for "Expected Monthly Revenue" where:

 

Expected Monthly Revenue = If Frequency = Every Month, then = Amount,

                                                If Frequency = Every two weeks, then = 2*Amount,

                                                If Frequency = Every week, then = 52*Amount/12

 

I have tried in the Query Editor with Conditional column, but couldn't put a formula for result.

 

Then I've tried with calculated column, but can't find the right DAX syntax to get down to the specific entries in "Frequency" column.

Many thanks in advance

 



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.