Forum Discussion

theglamgamer's avatar
theglamgamer
Regular Visitor
3 years ago

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

I am trying to execute the following DAX but keep getting multiple columns can't be converted to scalar value:

 

Current Closing Period = IF('Fiscal Year Period Closing Date'[Closing Date Greater Than Today] = "Yes" && MINX('Fiscal Year Period Closing Date', 'Fiscal Year Period Closing Date'[Closing Date Greater Than Today] = "Yes"), FILTER('Fiscal Year Period Closing Date','Fiscal Year Period Closing Date'[Days to Closing] = ""))

 

Should I create a separate DAX formula for the second half then combine both? Sorry am new so not sure what to do. Thank you! 🙂

2 Replies

  • theglamgamer , Not very clear.

    You can have measure like

     

    Closing GT Today =
    IF(MIN('Fiscal Year Period Closing Date'[Closing Date]) > TODAY(), "Yes", "No")

     

    Then you can have a measure like

     

    Current Close Period =
    IF(
    [Closing GT Today] = "Yes" &&
    HASONEVALUE('Fiscal Year Period Closing Date'[Days to Closing]),
    [Measure],
    BLANK()
    )

  • Hi theglamgamer ,

    Could you please clarify the expected result? From the formula you provided, FILTER function will return a table, seems you want to get a table if the conditions are met, so do you want to create a new table? Besides, the code in red box seems wrong, I guess what you expect is to determin weather the min [Closing Date Greater Than Today] is "Yes". If so, "Yes" should be outside of the bracket.

    Look forward to your reply!

     

    Best regards,

    Community Support Team_yanjiang