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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
timEalll
Regular Visitor

Divide categories total by baseline total

I have a problem I need help with, I am still a newbie in Power BI.

timEalll_0-1680078012537.png

 

I created Total measure to add scope1 and scope2.
The issue I am facing is the take the Total of the "Baseline 19/20" which is 1121 and use it to divide total of "Actual 20/21, Actual 21/22, Actual 22/23".
Hence, I want my result to be 

timEalll_0-1680077860063.png

Please note if Actual 23/24 appears it will automatically do the calculation.
Can you help me please?

1 ACCEPTED SOLUTION
SamInogic
Super User
Super User

Hi,

 

As per our understandings you are looking for a column based on some Conditions,
Here what I have found for Reaching to your Requirement,

 

Initially we have to Create Calculated column with below Dax Expression,


Custom_Carbon =

var Basline =
IF('Sample table'[Carbon] = "Baseline 19/20",'Sample table'[Total],0)

return
Basline

 

Thereafter we can Create our vs Column with below dax Expression


vs =

var result =
DIVIDE('Sample table'[Total],MAX('Sample table'[Custom_Carbon]),0)

return ROUND(IF(result =
1,BLANK(),result),2)

 

SamInogic_0-1680084299750.png

 

Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

View solution in original post

3 REPLIES 3
SamInogic
Super User
Super User

Hi,

 

As per our understandings you are looking for a column based on some Conditions,
Here what I have found for Reaching to your Requirement,

 

Initially we have to Create Calculated column with below Dax Expression,


Custom_Carbon =

var Basline =
IF('Sample table'[Carbon] = "Baseline 19/20",'Sample table'[Total],0)

return
Basline

 

Thereafter we can Create our vs Column with below dax Expression


vs =

var result =
DIVIDE('Sample table'[Total],MAX('Sample table'[Custom_Carbon]),0)

return ROUND(IF(result =
1,BLANK(),result),2)

 

SamInogic_0-1680084299750.png

 

Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Hi @SamInogic what should I do when another Column is added called company as shown below

timEalll_0-1680436029047.png

When I used your solution it didn't work becasue of the baseline. For company "IGG" has a baseline 19/20 of 1121" and company BPA has a baseline 19/20 of 1000.

How can I achieve this ensuring that each company should use it baseline for the calculation? as shown above in Vs column

@SamInogic  - Thank you

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors