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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
genashpuryk
Helper I
Helper I

SELECTEDVALUE multiple objects

Hello colleagues! Looks like I have a common issue with = SELECTEDVALUE returning only single value, whereas I need multiple values shown: 

genashpuryk_0-1718187257657.png

Are there any ways to simplify the solutins? I met some with using CONCATENATEX function, but that doesn't quite work:

genashpuryk_1-1718187397440.png

I would be grateful if you help me with this trouble. 

1 ACCEPTED SOLUTION
Alex87
Solution Sage
Solution Sage

correct, you cannot filter if you use CONCATENATEX.

For what you want to achieve you need something close to this

 

 

VAR _Selection = VALUES('NEWDataMonth Current'[Month])
VAR CurrentCost = 
    IF(
        ISBLANK(SELECTEDVALUE('NEWDataMonth Current'[Month])),
        CALCULATE(
            [MainSumCost],
            FILTER(
                'DatabaseNEW',
                'DatabaseNEW'[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source])
                && 'DatabaseNEW'[Date].[Month] IN _Selection
            )
        ),
        CALCULATE(
            [MainSumCost],
            FILTER(
                'DatabaseNEW',
                'DatabaseNEW'[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source])
                && 'DatabaseNEW'[Date].[Month] = SELECTEDVALUE('NEWDataMonth Current'[Month])
            )
        )
    )
RETURN
    CurrentCost

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Alex87
Solution Sage
Solution Sage

correct, you cannot filter if you use CONCATENATEX.

For what you want to achieve you need something close to this

 

 

VAR _Selection = VALUES('NEWDataMonth Current'[Month])
VAR CurrentCost = 
    IF(
        ISBLANK(SELECTEDVALUE('NEWDataMonth Current'[Month])),
        CALCULATE(
            [MainSumCost],
            FILTER(
                'DatabaseNEW',
                'DatabaseNEW'[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source])
                && 'DatabaseNEW'[Date].[Month] IN _Selection
            )
        ),
        CALCULATE(
            [MainSumCost],
            FILTER(
                'DatabaseNEW',
                'DatabaseNEW'[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source])
                && 'DatabaseNEW'[Date].[Month] = SELECTEDVALUE('NEWDataMonth Current'[Month])
            )
        )
    )
RETURN
    CurrentCost

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Thank you! That worked perfectly. Have a nice day!

Alex87
Solution Sage
Solution Sage

 

DAX measure can only retrieve scalar values. CONCATENATEX is the way to go

This is the pattern to follow:

 

SelectedMonths = 
CONCATENATEX(
    VALUES('DateTable'[MonthName]),
    'DateTable'[MonthName],
    ", ",
    'DateTable'[Date]
)

 

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!




Thank you! The issue is, I need to use multiple month to filter other measure:

genashpuryk_0-1718194676545.png

But I can't filter with CONTENCATEX function. If possible, share your ideas on this one. Here's the dax code for my measure:

CurrentCost = IF(
        ISBLANK(SELECTEDVALUE('NEWDataMonth Current'[Month])),
        CALCULATE([MainSumCost],
            FILTER('DatabaseNEW','DatabaseNEW'[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source]))),
        CALCULATE([MainSumCost],
            FILTER(DatabaseNEW,DatabaseNEW[Source] = SELECTEDVALUE('NEWDataVersion Current'[Source])),
            FILTER('DatabaseNEW','DatabaseNEW'[Date].[Month] = SELECTEDVALUE('NEWDataMonth Current'[Month])))
        )



Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.