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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Need help in creating a calculated column.

Hi all. 

PRI123_0-1666704927959.png

 

 

In the picture above I have "Exec_Name" and "total" ,"Opportunity Number"and "Opportunity value". The "total" itself is a calculated table which uses the below formula:

revenue measure sample = var a = SUMMARIZE(ATE,ATE[Exec_name],ATE[Opportunity_Number],"total",SUM(ATE[Opportunity_value]))
return
a
 
For example, in the picture above , "adam branden"(first exec name) has 2 values mapped to him which are 1500.00 and 412502.37. So , I wanted a calulated column as "revenue" which will add this 1500.00+412502.37 that will result as 414,002.37. 
Likewise for every exec name it should add up the 'n' number "opportunity_value" mapped to that exec_name. How do i create this ? Any help would be much appreciated. Thanks in Advance.

 

Do i require a new calculated column as "revenue" or these adding up of the values can be done in the "total" column itself?

1 ACCEPTED SOLUTION
eliasayy
Impactful Individual
Impactful Individual

Hmm i think your best option would be to first create a calculated column as the formula i gave you first, then do the summary with max

View solution in original post

6 REPLIES 6
eliasayy
Impactful Individual
Impactful Individual

Hello can you please try

Calculate([measure of revenue],allexcept(table,table[exc name])) 

Anonymous
Not applicable

Hi @eliasayy . The measure of revenue is a calculated table. so when i tried using your formula it is not detecting that calculated table.

eliasayy
Impactful Individual
Impactful Individual

can you please try this instaed of your main measure?SUMMARIZE(ATE,ATE[Exec_name],ATE[Opportunity_Number],"total",calculate(SUM(ATE[Opportunity_value]),allexcept(table,table[exec name]))

Anonymous
Not applicable

@eliasayy Hi. Tried this:

rev = SUMMARIZE(ate,ATE[Exec_name],ATE[Opportunity_Number],"total",CALCULATE(SUM(ATE[Opportunity_value]),ALLEXCEPT(ATE,ATE[Exec_name])))
 
This is returning an error like this:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
eliasayy
Impactful Individual
Impactful Individual

Hmm i think your best option would be to first create a calculated column as the formula i gave you first, then do the summary with max

Anonymous
Not applicable

@eliasayy okay done

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors