The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 | Transactions | Region | Year |
Apple | 5 | North | 2023 |
Orange | 4 | North | 2023 |
Banana | 3 | South | 2024 |
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!
Solved! Go to Solution.
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])
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 @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])
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 @ChrisR22 ,
I created some data:
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:
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?
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.