Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
MHAO
Frequent Visitor

Measure returns multiple values instead of a single value.

Hi Everyone,

I am trying to pull out the current week-period from a table which have weekly periods named as weekend. i.e. 07/22/23 | 7/29/23 ... and so on.

The measure I work is like 

CurrentWeek = CALCULATE(FILTERS(Table1[Weekend Date]), YEAR(Table1[Weekend Date]) = YEAR(TODAY()) && MONTH(Table1[Weekend Date]) = MONTH(TODAY()) && DAY(Table1[Weekend Date]) - DAY(TODAY()) < 7)

But it returns multiple values. Focusing on the "...(FILTERS(Table1..." part to solve the issue. Any help/comment please?

Thank you

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @MHAO ,

FILTERS function cannot be used in the foramt "calculate(filters(......". According to your description, if you want to get a table showing the current week-period, here's my solution.

1.Create a table with below formula:

vyanjiangmsft_0-1691661412432.png

CurrentWeek =
SELECTCOLUMNS (
    FILTER (
        'Table1',
        YEAR ( Table1[Weekend Date] ) = YEAR ( TODAY () )
            && MONTH ( Table1[Weekend Date] ) = MONTH ( TODAY () )
            && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) < 7
            && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) > 0
    ),
    "Weekend Date", 'Table1'[Weekend Date]
)

Result:

vyanjiangmsft_1-1691661619336.png

 

Or if you want to use a measure to show the values, create a measure:

Measure =
VAR _T =
    SELECTCOLUMNS (
        FILTER (
            'Table1',
            YEAR ( Table1[Weekend Date] ) = YEAR ( TODAY () )
                && MONTH ( Table1[Weekend Date] ) = MONTH ( TODAY () )
                && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) < 7
                && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) > 0
        ),
        "Weekend Date", 'Table1'[Weekend Date]
    )
RETURN
    CONCATENATEX ( _T, [Weekend Date], " | " )

Get the result:

vyanjiangmsft_2-1691661975692.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @MHAO ,

FILTERS function cannot be used in the foramt "calculate(filters(......". According to your description, if you want to get a table showing the current week-period, here's my solution.

1.Create a table with below formula:

vyanjiangmsft_0-1691661412432.png

CurrentWeek =
SELECTCOLUMNS (
    FILTER (
        'Table1',
        YEAR ( Table1[Weekend Date] ) = YEAR ( TODAY () )
            && MONTH ( Table1[Weekend Date] ) = MONTH ( TODAY () )
            && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) < 7
            && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) > 0
    ),
    "Weekend Date", 'Table1'[Weekend Date]
)

Result:

vyanjiangmsft_1-1691661619336.png

 

Or if you want to use a measure to show the values, create a measure:

Measure =
VAR _T =
    SELECTCOLUMNS (
        FILTER (
            'Table1',
            YEAR ( Table1[Weekend Date] ) = YEAR ( TODAY () )
                && MONTH ( Table1[Weekend Date] ) = MONTH ( TODAY () )
                && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) < 7
                && DAY ( Table1[Weekend Date] ) - DAY ( TODAY () ) > 0
        ),
        "Weekend Date", 'Table1'[Weekend Date]
    )
RETURN
    CONCATENATEX ( _T, [Weekend Date], " | " )

Get the result:

vyanjiangmsft_2-1691661975692.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

barritown
Super User
Super User

@MHAO

Even if you're [DAX] code returns a single value, it's a table row, not a scalar value. Try applying MINX or MAXX to make it scalar - it is a common trick for such cases.

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors