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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

combine 2 columns as 1 slicer in Power BI Or add 2 columns to slicer value. (multiple value)

Hi,
I have problem about how to combine 2 columns as 1 slicer in Power BI. Or add 2 columns to slicer value. (multiple value).
So, let me explain first. I have 2 columns, StartDate and EndDate with the Data Type is Date. And I need only 1 slicer to choose both the Start and End Date (if I choose between layout on the slicer, I can fill the first field for StartDate and the second one to EndDate). Can anybody tell me how to create that slicer ?
Or maybe what I need to do first with these columns before I adding it to the slicer. Thank you

Maybe help to understand more, here's the picture

IMG_20190909_094456.JPG

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

Hi @Anonymous ,

 

You can make these two columns to one column with a new table.

Table 2 =
UNION (
    SELECTCOLUMNS ( 'Table', "Date", 'Table'[start] ),
    SELECTCOLUMNS ( 'Table', "Date", 'Table'[end] )
)

The new "Date" column can be used in the slicer. Then you can refer to this case:

https://community.powerbi.com/t5/Desktop/DAX-measures-based-on-MAX-and-MIN-dates-selected-in-the-Time/td-p/776468

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can make these two columns to one column with a new table.

Table 2 =
UNION (
    SELECTCOLUMNS ( 'Table', "Date", 'Table'[start] ),
    SELECTCOLUMNS ( 'Table', "Date", 'Table'[end] )
)

The new "Date" column can be used in the slicer. Then you can refer to this case:

https://community.powerbi.com/t5/Desktop/DAX-measures-based-on-MAX-and-MIN-dates-selected-in-the-Time/td-p/776468

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Ashish_Mathur
Super User
Super User

Hi,

Since you have not shared the complete question, i guess a simple way would be to build a single column in the Query Editor with all dates using the following M function in the Query Editor.

{=Number.From('Date'[Start Date])..Number.From('Date'[End Date])}


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur ,

 

I'm sorry but I don't understand yet. How to create it ?

I created new column with your syntax and I got error

eror.PNG

Is my syntax correct ?

 

Thanks

Hi,

I edited my original reply.  Please try that revised formula in the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors