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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dax Measure help

I need to add 0.5 to a measure within a matrix table, however when I do that it keeps adding a year to the table with 0.5 in that column. Is there a way to add 0.5 to the dax measure without it creating a default value for other years and adding them to the table?

 

For example, the table has 2021 data and 2022 data 2021 has the data which needs 0.5 added to it. However, by adding 0.5 to the dax measure it adds the years 2019, 2020 and 2023 with 0.5 only which isnt accurate.

The Dax measure used is:

Weighted Average Profit Margin =
CALCULATE(
DIVIDE([IEA*PROFIT MARGIN], SUM('Detail'[IEA]))
+ (0.5))
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

FYI that you don't need the CALCULATE with that expression, but here is how to adapt it.

 

Weighted Average Profit Margin =
VAR wapf =
    DIVIDE ( [IEA*PROFIT MARGIN], SUM ( 'Detail'[IEA] ) )
RETURN
    IF ( ISBLANK ( wapf )BLANK ()wapf + 0.5 )

 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

FYI that you don't need the CALCULATE with that expression, but here is how to adapt it.

 

Weighted Average Profit Margin =
VAR wapf =
    DIVIDE ( [IEA*PROFIT MARGIN], SUM ( 'Detail'[IEA] ) )
RETURN
    IF ( ISBLANK ( wapf )BLANK ()wapf + 0.5 )

 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Ah that's perfect thank you! @mahoneypat 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors