Forum Discussion

danish169's avatar
danish169
Helper I
4 years ago
Solved

Firstnonblank and a filtered table

Hi, tried many variations of the following dax expression. Sometimes I get an error, other times a blank and then the error about cannot find a scalar value. I have experimented with min too.    Th...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI danish169,

    Here is the formula that I modify based on the expressions that you share, you can try it if the performance improved:

    Added Wishlist By Admin =
    VAR filtered =
        FILTER (
            'temp wishlist_stock_alert',
            [created_at] <= 'temp call_suite_list_calls_by_extension'[DateFinish]
                && [created_at] >= 'temp call_suite_list_calls_by_extension'[DateStart]
                && [created_by] = 'temp call_suite_list_calls_by_extension'[UserID]
        )
    VAR _id =
        MINX ( filtered, [id] )
    RETURN
        IF (
            'temp call_suite_list_calls_by_extension'[UserID] <> BLANK (),
            MINX ( FILTER ( filtered, [id] = _id ), [created_by] )
        )

    Regards,

    Xiaoxin Sheng