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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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