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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChrisR22
Helper III
Helper III

Area chart with Legend that also include a line for total

Hello,

 

This seems like it should be a basic feature, but I haven't been able to find it. I am looking to create an area chart that sums the total of values in column A that meet a certain criteria of column B.

 

Client

TransactionsRegionYear
Apple5North2023
Orange4North2023
Banana3South2024

 

This is achievable by having the x axis be Year, y axis by sum of Transactions, and Legend being Region.

 

However, I am also looking to have a line shown in the graph that represents the total transactions (regardless of region) for each date value.

 

Does anyone have any idea on how to do it?

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @ChrisR22 ,

 

You can directly create three measures to display:

Apple =
SUMX(
    FILTER('Table','Table'[Client]="Apple"),[Transactions])
Orange =
SUMX(
    FILTER('Table','Table'[Client]="Orange"),[Transactions])
Total transactions over time =
SUMX(ALLSELECTED('Table'),[Transactions])

vyangliumsft_0-1707212965855.png

 

Best Regards,

Liu Yang

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi  @ChrisR22 ,

 

You can directly create three measures to display:

Apple =
SUMX(
    FILTER('Table','Table'[Client]="Apple"),[Transactions])
Orange =
SUMX(
    FILTER('Table','Table'[Client]="Orange"),[Transactions])
Total transactions over time =
SUMX(ALLSELECTED('Table'),[Transactions])

vyangliumsft_0-1707212965855.png

 

Best Regards,

Liu Yang

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

Anonymous
Not applicable

Hi  @ChrisR22 ,

I created some data:

vyangliumsft_0-1707122018030.png

 

Here are the steps you can follow:

1. Create measure.

criteria =
SUMX(
    FILTER(ALL('Table'),
    'Table'[Client]="Apple"&&'Table'[Region]="North"),[Transactions])
Group_date =
SUMX(
    FILTER(ALLSELECTED('Table'),'Table'[Date]=MAX('Table'[Date])),[Transactions])

2. Result:

vyangliumsft_1-1707122018040.png

 

 

Best Regards,

Liu Yang

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

 

Hi @Anonymous ,

 

Thank you for the response.

I am a bit confused, those look to be two separate measures, correct? One we are calling Criteria and the other we are calling Group_date, yes?

Can you tell me which of those three lines in the graph are to represent:

- Apple's transactions over time

- Orange's transactions over time

- Total transactions over time

 

The labels/names of the measures don't really make that clear.

 

Is it possible to create this graph cleanly so that there is only the month and year displayed on the x axis?

Daniel29195
Super User
Super User

@ChrisR22 

 

to calculate the sum of transactions (regardless of region) , 

use this measure : 
total sales ( independent from region ) =

calculate( 

sum(tbl_name[transaction_col_name] ,

removefilters( tbl_name[region_col_name])

)

 

let me know if this works for you .

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

Hi @Daniel29195 ,

 

Thank you for the response, however this doesn't really help me display the total in the graph, as the graph only allows one item in the y-axis field.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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