Forum Discussion

need_help-1324's avatar
need_help-1324
New Member
1 year ago
Solved

a single value for column cannot be determine

I am just trying to make simple if statement to capture corresponding value "optionvalue" based on the name "optionname"   I wrote  RESULT = IF(tablename[fieldname] = "value", sum(tablename[fieldn...
  • bhanu_gautam's avatar
    1 year ago

    need_help-1324 Try using

    dax
    RESULT = IF(
    SELECTEDVALUE(DataImport_Summary[OptionName]) = "Entitlements",
    SUM(DataImport_Summary[OptionValue]),
    0
    )

  • mdaatifraza5556's avatar
    1 year ago

    Hi need_help-1324 
    Can you please try this DAX.

    Result =
        CALCULATE(
            SUM('Table'[OptionValue]),
            'Table'[OptionName] = "Entitlements"
        )

     

    Please accept it as a solution if you got your solution
  • divyed's avatar
    1 year ago

    Hello need_help-1324 ,

     

    You can use below dax to show desired value in a card : This way your value will be displayed if you click on optionName column

     

    Result =
        CALCULATE(
            SUM('SampleTable'[OptionValue]),
            'SampleTable'[OptionName] = SELECTEDVALUE(SampleTable[OptionName])
        )
     

    I hope this helps.

     

    Did I answer your query ?   Mark this as solution if this helps, Kudos are appreciated.

     

    Kind Regards,

    Neeraj