Forum Discussion

Azco_Data's avatar
Azco_Data
Frequent Visitor
1 year ago
Solved

How to split the values into each months between the start date and end date

Hi Everyone. 
I have a table visual that shows the following columns 

Here, above, the UnbilledServiceEnd comes blank from the backend, but I have a date slicer on top from the Dates table, and UnbilledServiceEnd shows the selected value from the date slicer on top. I want to split the usage and dollars into months divided by the active service date in the specific month. 
The result I am searching for is this below. I need to do it in power bi desktop if it is possible

 

if anyone has accomplished the same task before, please share with your solutions and experiences.

7 Replies

  • Azco_Data 

    If I am not mistaken, in expected result, [unbilled usage] and [unbilled dollars] is calculated by diving the actual value with DaysInMonth value. Can you explain the source of DaysInMonth column?

     

    Need a Power BI Consultation? Hire me on Upwork

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!


    • Azco_Data's avatar
      Azco_Data
      Frequent Visitor

      Hi, I do not have the DaysInMonth column in my dataset but I need to create it as a dynamic measure to display the number of service days for each month. 
      For exampple, it starts on Feb 25 and it has 3 days of service for Feb 25 then it is ending on March 4 and it has 4 days of service for March 25 ( and it should be dynamic, if the user selects march 9, it should display 9 days for March and divide the Usage and Dollars by 9 )

  • Azco_Data's avatar
    Azco_Data
    Frequent Visitor

    Hi, I do not have the DaysInMonth column in my dataset. It needs to be created as a dynamic measure that calculates the number of service days in a specific month. For example, it starts on Feb 25 and it has 3 days of Service for Feb and it is ending on Mar 4 selected from the slicer and it has 4 days of Service for March. I need help to create that dynamic measure to calculate the number of days in a month then I will be able to divide Usage and Dollars by number of days for each month.

  • hI Azco_Data 

    How did you come up with unbilled usage for row in the second image. From  Feb-25 to Mar-4 2025, there are only 8 days.  1040.69/8 * 3 = 390.26

     

      • Azco_Data's avatar
        Azco_Data
        Frequent Visitor
        Spoiler
         

        Thanks. I am new to this community so I am not being able to attach the pbix file. But here the task is to split the usage and dollars for each month between the start date and end date. As I described in the other replies, the usage and dollars are divided by the number of active days in each month between start date and end date