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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello !
I created a segment to choose a period to display my data in a visual table :
My problem is that the "between" style requires me to choose a day, a month and a year, whereas in my calendar table I only have the notion of month and the year, the days being all the first of the month :
I have a problem because I want to display my selection in an other visual, and when I choose a day higher than the first of the month for the start date, it displays the next month in my selection :
here is the code to display the selection :
How to solve this problem?
Hi @saben02 ,
According to your data model, I think your issue should be caused that 03/01/2017 is not in range 03/25/2017 to 05/25/2017 and there is only 03/01/2017 in your data model. So Power BI couldn't find date in March, it will return 04/2017. Here I suggest you to create a calendar table by CALENDAR() or CALENDARAUTO() function which with continuous date.
Then your measure should look like as below.
choix seg date P1 onglet cumul =
IF (
ISFILTERED ( 'Calendar'[Date] ),
"From " & FORMAT ( MIN ( 'Calendar'[Date] ), "MM/YYYY" ) & " to "
& FORMAT ( MAX ( 'Calendar'[Date] ), "MM/YYYY" ),
"All the period"
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, thank you so much for your reply.
This method solves my display problem but still doesn't show the data for the corresponding periods.
Indeed , if the user chooses a date other than the first of the month, I want it to display only the data for that month.
But here when I choose January 2, 2017 on my slicer, for example, it will take into consideration the data for the following month, i.e. February. ☹️
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 47 | |
| 29 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 126 | |
| 108 | |
| 55 | |
| 39 | |
| 33 |