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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mshamsiev1234
Regular Visitor

Month Filter Displayed As Text

Hey community!

 

I am looking to create a text box or card based visual that displays all selected filters for our end users. I have managed to do so with the standard filters (though it only seems to work for one selection). However, is there a way I can do the same for a date range filter? I create a measure as per the below:

Measure = CONCATENATEX(VALUES('Calendar'[Month name]),'Calendar'[Month name],",")

 

But this results in the below display:

mshamsiev1234_0-1733444977953.png

 

Is it possible to show it in the following format:  Jul-24 > Oct-24? 


Cheers,

Mike

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @mshamsiev1234 

why not get the min and max months selected instead?

MinMaxMonths = 
VAR MinMonth = FORMAT(MIN('Calendar'[Month]), "mmm-yy")
VAR MaxMonth = FORMAT(MAX('Calendar'[Month]), "mmm-yy")
RETURN MinMonth & ">" & MaxMonth

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
mshamsiev1234
Regular Visitor

Thank you all for the incredible help! Always learn something new from the community 🙂 

Anonymous
Not applicable

Hi @mshamsiev1234 ,

 

Thank you for reaching out to our community.

I see that rajendraongole1 and danextian have provided great solutions. Did their replies help you?

If so, please accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

If not, please provide a more detailed description, preferably some virtual sample data, and the expected results.

 

Best Regards,

Stephen Tao

 

Hey Stephen thanks for the message 🙂 All great solutions. In this case, I have used danextians solution which worked a treat. Thanks again to everyone here, much appreciated!

danextian
Super User
Super User

Hi @mshamsiev1234 

why not get the min and max months selected instead?

MinMaxMonths = 
VAR MinMonth = FORMAT(MIN('Calendar'[Month]), "mmm-yy")
VAR MaxMonth = FORMAT(MAX('Calendar'[Month]), "mmm-yy")
RETURN MinMonth & ">" & MaxMonth

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ashish_Mathur
Super User
Super User

Hi,

And what if the users select non-continuous months?


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

Hi @mshamsiev1234 -  Use the MIN and MAX functions to identify the range of selected dates in the slicer and format them appropriately.

 

SelectedDateRange =
VAR MinDate = MIN('Calendar'[Date])
VAR MaxDate = MAX('Calendar'[Date])
RETURN
IF (
ISBLANK(MinDate) || ISBLANK(MaxDate),
"No Dates Selected",
FORMAT(MinDate, "MMM-yy") & " > " & FORMAT(MaxDate, "MMM-yy")
)

 

 

It works, please check and confirm





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.