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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AZL
Frequent Visitor

Area Chart to show accumulated values for each year

Hello Everybody

 

I need your helps guys with the following:

 

I have the following dataset:


Capture.JPG

 

I want to create an area chart to show the accumulated value for each year..so The output chart will be like this

 

2015 = 4

2016 = 9

2017 = 15

2018 = 22

 

The default area chart will show only the individual value for each year not the accumulative.

 

How can I solve this?!!

 

Thanks

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

 

Ensure that the Date column in your dataset carries actual date entries.  Create a Calendar Table and build a relationship from the Date column of your dataset to the Date column of the Calendar Table.  In the Calendar Table, create a Year column with this calculated column formula Year = Year(Calendar[Date]).  In your visual, drag Year from the Calendar Table.

 

Write these measures

 

Total = SUM('Table1'[Data])

Total since inception = CALCULATE([Total],DATESBETWEEN('Calendar'[Date],MINX(ALL(Calendar),'Calendar'[Date]),MAX('Calendar'[Date])))

 

Hope this helps.

 

 


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

@Ashish_Mathur

 

Thank yo for your reply.

 

Excuse me I'm still new to the software that's why I still can't figure out some of the points you mentioned in your reply.

 

Where should I write the measures? and how can I create a calender table?

 

I will appreciate it if you attach a file or something for more illustration.

 

One more question, in my actual dataset there are some rows without a date "null" which I dont want to be included in the calculations.Is this solution still valid in this case or I have to add something in order to exclude items without date?

 

Thank you again.

Hi @AZL,

 

Your date column has nulls. That's why a calendar table is needed. Please share a dummy sample. A simple way to create a calendar table is like below.

 

Calendar = Calendarauto()

 

 

Best Regards,

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

Greetings,

 

@Ashish_Mathur @v-jiascu-msft

 

 Unfortunately I dont know how to attach a file in here.

 

but here's a sample of my dataset and the resulted chart:

 

Capture.JPG 

 

 

Capture1.JPG

 

What I'm looking for is to get the accumulated value for each year without taking into consideration "null" cells.

 

Thanks,

Hi,

 

You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


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

@Ashish_Mathur

 

That's exactly what I want.

 

Thank you so much for your help.

You are welcome.


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

Hi,

 

Share the link from where i can download your PBI file.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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