Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

DAX

Hello guys, hope you're all doing well. I didn't find any answers to my question so I'm asking it to you. Maybe you'll help me to solve this "issue".   I have this graph I made, showing the delta ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Now that you have created a measure for deltas, you can use the existing measure to create another measure to calculate positive and negative deltas. You can try following these steps:

    1. You need to create a new measure.

     

    MEASURE = 
    VAR _1 =
        CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Price] > 0 ) )
    VAR _2 =
        CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Price] < 0 ) )
    RETURN
        IF ( SELECTEDVALUE ( 'Table (2)'[Selected] ) = "+", _1, _2 )
    

     


    Final output:

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

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