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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
vengadesh_p
Helper I
Helper I

Need to show total charge based on year, quarter, monthly view

Hi all,

I have data like the image below

vengadesh_p_1-1745471726088.png

 

I want to show Charges based on year, Quarter, & Month view 

Expected Result


Year View

vengadesh_p_2-1745471959954.png

 

Quarter View

vengadesh_p_3-1745472140537.png

Same as monthly view, want to show 


Data

IDStart DateEnd DateNo Month ActiveCharge Per Month
ID_11 January 20231 January 20252410
ID_215 February 202315 February 20263620
ID_320 May 202320 May 20252430
ID_420 May 202320 May 20241210
1 ACCEPTED SOLUTION
kushanNa
Solution Sage
Solution Sage

hi @vengadesh_p 

 

Let's say YourData is your table,

 

Create a Calculated table

 

ChargesByMonth1 = 
ADDCOLUMNS (
    GENERATE (
        YourData,
        VAR StartDate = DATE(YEAR([Start Date]), MONTH([Start Date]), 1)
        VAR MonthsCount = [No Month Active]
        RETURN
            ADDCOLUMNS (
                GENERATESERIES ( 0, MonthsCount - 1, 1 ),
                "MonthDate", EDATE(StartDate, [Value]),
                "Charge", [Charge Per Month]
            )
    ),
    "Year", YEAR([MonthDate]),
    "Quarter", "Q" & FORMAT(QUARTER([MonthDate]), "0"),
    "YearQuarter", FORMAT([MonthDate], "YYYY") & " Q" & QUARTER([MonthDate])
)

 

use it in a matrix table

 

kushanNa_0-1745475984087.png

 

View solution in original post

2 REPLIES 2
v-sgandrathi
Community Support
Community Support

Hi @vengadesh_p ,

 

Thankyou  @kushanNa for your reply on the issue.

Has your issue been resolved? If the response provided by the community member addressed your concern, kindly confirm.

Marking it as Accept Answer and give us Kudos if you found it helpful allows us to ensure that the solutions shared are valuable for the entire community.

 

If you have any further questions, feel free to reach out!
Thank you for your cooperation!

kushanNa
Solution Sage
Solution Sage

hi @vengadesh_p 

 

Let's say YourData is your table,

 

Create a Calculated table

 

ChargesByMonth1 = 
ADDCOLUMNS (
    GENERATE (
        YourData,
        VAR StartDate = DATE(YEAR([Start Date]), MONTH([Start Date]), 1)
        VAR MonthsCount = [No Month Active]
        RETURN
            ADDCOLUMNS (
                GENERATESERIES ( 0, MonthsCount - 1, 1 ),
                "MonthDate", EDATE(StartDate, [Value]),
                "Charge", [Charge Per Month]
            )
    ),
    "Year", YEAR([MonthDate]),
    "Quarter", "Q" & FORMAT(QUARTER([MonthDate]), "0"),
    "YearQuarter", FORMAT([MonthDate], "YYYY") & " Q" & QUARTER([MonthDate])
)

 

use it in a matrix table

 

kushanNa_0-1745475984087.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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