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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Conditional Column

Edward93_0-1697268195334.png

Good morning

I want to see if there is a shape with any conditional columns or with the M language and see the following:

In the carbon text column the carbon numbers are displayed, for example the carbon text "7" has the value "49.2" but the next carbon text "7" has the value "null", I want to generate a condition where if the carbon 7 or another number has a value, it must be replicated in the other values that it has as "null". I got this column from a dynamization override.

Thank you.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You can try the following methods. In the Power BI Desktop, use Dax:

Column =
IF ( [Value] = "null",
    CALCULATE ( MAX ( 'Table'[Value] ),
        FILTER ( 'Table', [Carbon] = EARLIER ( 'Table'[Carbon] ) && [Value] <> "null" )
    ),
    [Value]
)

vzhangti_0-1697510533164.png

Is this the result 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

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You can try the following methods. In the Power BI Desktop, use Dax:

Column =
IF ( [Value] = "null",
    CALCULATE ( MAX ( 'Table'[Value] ),
        FILTER ( 'Table', [Carbon] = EARLIER ( 'Table'[Carbon] ) && [Value] <> "null" )
    ),
    [Value]
)

vzhangti_0-1697510533164.png

Is this the result 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.

 

Ritaf1983
Super User
Super User

Hi @Syndicate_Admin 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.