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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Linechart filtering

I currently am working on a linechart wich needs to show the total sales in € per month of a specific order type.

It is pretty much working except the line chart shows the total sales amount of all the order types, eventhough i did put a filter on it which should filter it on one specific order type.

 

i hope someone has any idea on how i could solve this and make the linechart sum up all the sales of a specific order type per month.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous,

I created some data:

vyangliumsft_0-1648188572509.png

Here are the steps you can follow:

1.Use Enter data to create a table.

vyangliumsft_1-1648188572510.png

2. Create measure.

slice_amount =
var _select=SELECTEDVALUE('Slicetable'[Slice])
return
IF(
    _select in {"A","B","C"},CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[OrderType]=_select)),
    CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month]))))

3. Result:

The slicer selects ALL to display the full monthly amount:

vyangliumsft_2-1648188572512.png

 

The slicer selects A and displays the monthly amount in A:

vyangliumsft_3-1648188572514.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi  @Anonymous,

I created some data:

vyangliumsft_0-1648188572509.png

Here are the steps you can follow:

1.Use Enter data to create a table.

vyangliumsft_1-1648188572510.png

2. Create measure.

slice_amount =
var _select=SELECTEDVALUE('Slicetable'[Slice])
return
IF(
    _select in {"A","B","C"},CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[OrderType]=_select)),
    CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month]))))

3. Result:

The slicer selects ALL to display the full monthly amount:

vyangliumsft_2-1648188572512.png

 

The slicer selects A and displays the monthly amount in A:

vyangliumsft_3-1648188572514.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

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

amitchandak
Super User
Super User

@Anonymous , Not very clear ,

1. you can use order type as legend

2. you can slicer or filter for order type

3. Create a measure with order type

example

calculate(sum(Table[Value]), filter(Table, Table[Order Type] = "ABC" ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Sorry i'll put in some screenshots, that hopefully wil clarify the situation.

Please don't hate on my dashboard it is my first time using Power BI😂.

As you can see in the first printscreen, the table shows all the orders of the company, with the amount in € and the ordertype, in this situation the linechart is correct because it sums up all the orders that were sold per month. 

However, as you can see in the second printscreen, whenever i select ordertype 60 (which is the specific ordertype i want to show in the linechart) the table does filter out all the other order types. But the linechart stays exactly the same.

What i would like to see is that the line chart sums up all the orders with order type 60 per month.

i have already tried a lot but can't seem te figure out why it keeps showing all order types.

I hope this makes more sense😁

printscreen 1.pngprintscreen 2.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors