cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gab_BI
New Member

How to create calculated column with only some values of another column

Hi everyone,

I have a situation like the following:

Gab_BI_0-1654069441135.png

 

I want to create another column only with Electricity coefficient. Final table must be like the following:

 

Gab_BI_1-1654069513342.png

 

I don't want create Electricity Coeff. writing 0.0036 inside the formula because that value change when app is refreshed.

 

Any solution?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Gab_BI 

 

You can try the following methods. Find the minimum value of each ID.

Column:

Electricity Coeff. =
CALCULATE (
    MIN ( 'Table'[Coeff.] ),
    FILTER ( 'Table', [ID] = EARLIER ( 'Table'[ID] ) )
)

vzhangti_0-1654479736423.png

Does this match the output you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Gab_BI 

 

You can try the following methods. Find the minimum value of each ID.

Column:

Electricity Coeff. =
CALCULATE (
    MIN ( 'Table'[Coeff.] ),
    FILTER ( 'Table', [ID] = EARLIER ( 'Table'[ID] ) )
)

vzhangti_0-1654479736423.png

Does this match the output you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors