Forum Discussion

Julius410's avatar
Julius410
Frequent Visitor
4 years ago
Solved

IF Formula Calculated Column

Hi there,   I am trying to create a calculated column that allows me to differentiate between projects that have a budget and projects with no budget. Currently, I am using the following formula: ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Julius410 ,

     

    You could create a dynamic measure to display the budget value.

    Before you create the measure, create a table with the following values for the slicer.

    You can create it by entering data.

    Then create the measure.

    Budget value =
    SWITCH (
        SELECTEDVALUE ( 'For Slicer'[Budgeted] ),
        "Budgeted", CALCULATE ( SUM ( 'Table'[Budget] ), FILTER ( 'Table', [Budget] > 0 ) ),
        "Budget N/A", BLANK ()
    )
    

     Here's the results. When you select 'Budgeted' in the slicer,

    When you select 'Budget N/A' in the slicer,

    Hope to help you.

     

    Best Regards,

    Stephen Tao

     

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