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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
nra12
New Member

how to get +ve and -ve value at the top of the X axis Bar after substracting 2 measure values

i want subtraction value of that bar and line  & the  subtracted values should show  above the  vertical bar check the another visual for the expected output i wanti want subtraction value of that bar and line & the subtracted values should show above the vertical bar check the another visual for the expected output i want""exact out put i want that is like this the substracted value between line and bar""""exact out put i want that is like this the substracted value between line and bar""

how to get +ve & -ve value at the top of the X axis Bar

after substracting 2 measure values check the attached pictures 

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @nra12 ,

 

You can try formula like below:

M_ = 
VAR next_ =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] >= MAX ( 'Table'[Date] )-1  )
    )
var cur = MAX('Table'[Value])
RETURN
    CALCULATE (
        MAX ( 'Table'[Value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] = next_ )
    ) -cur

vhenrykmstf_0-1665733898620.png

If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


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

 

Hey henryK thankyou for the response but the suggested one is not working as i want in visual " line clustered/Stack chart"

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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