Forum Discussion

micheledubose's avatar
micheledubose
Icon for Resolver II rankResolver II
5 years ago
Solved

Create sections in Power BI Desktop based on date column

I'm creating a report that needs to display the number of phone calls within a date range and a specific phone number. I have a page filter of date and phone number. The date range can vary depending on what the end user chooses.

 

Month  Day   Count of Phone Number
12/202012/01/2020 4
 12/09/2020 1
 Month Total 5

 

Month  Day   Count of Phone Number
1/20211/8/2021 2
 Month Total 2

 

Month  Day   Count of Phone Number
2/20212/05/2021 1
 Month Total 1

 

Instead I have this:
 

MonthCount of Phone Number
12/1/2020 4
12/9/2020 1
1/8/2021 2
2/05/2021 1
Total 8

 

Is it possible to separate the Month in sections? I know I can filter on the visual by selecting the date range that I want. However, as mentioned, the date range can vary depending on what the end user chooses. So, I'm unsure how to "dynamically" create such a filter within the report.

  • I was able solve my issue by using the Matrix visualization. I added the Month and Day columns as Rows and Count of Phone Number column as Values. As a result, I was able to get the "break/split" functionality that I was looking for.

8 Replies

  • You will want to add a calendar table to your data model. Then you can apply that to your sections.

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi micheledubose ,


    Based on the information you provide, do you want to separate the month in the date, and then filter the visual based on the month? If so, please refer to my following steps.

    You can separate the month in the Date in the power query, and then put the month field in the "filter" to filter data, and get below result:


    If the problem is still not resolved, please provide detailed error information. Let me know immediately, looking forward to your reply.

     

    Best Regards,
    Henry

     

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

     

    • micheledubose's avatar
      micheledubose
      Icon for Resolver II rankResolver II

      Hi v-henryk-mstf ,

       

      I forgot to mention that I'm connecting to an Analysis Server database.  Therefore, the steps you've mentioned are unavailable to me in Power BI Desktop.

      • v-henryk-mstf's avatar
        v-henryk-mstf
        Icon for Community Support rankCommunity Support

        Hi micheledubose ,


        Try to create a calculated column to get the month in the date.

         


        If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


        Best Regards,
        Henry


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

  • I was able solve my issue by using the Matrix visualization. I added the Month and Day columns as Rows and Count of Phone Number column as Values. As a result, I was able to get the "break/split" functionality that I was looking for.