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
shantupm5
Helper III
Helper III

Filter for a line graph

Hello,

 

I have two metrics on a line graph, 

1) Sum of Orders booked for all the customer

2) I want to show sum of orders booked per customer 

 

I want to compare 2nd metrics with 1 buy changing / applying a filter to the customer name. Where and how i can apply a filter for second metrics//

 

shantupm5_0-1680595150835.png

 

Please advice

 

Regards

Prashanth

2 ACCEPTED SOLUTIONS
joaoribeiro
Kudo Kingpin
Kudo Kingpin

Hi @shantupm5 ,

I believe you should create the two metrics changing the filter, as shown below:

1) Sum of Orders booked for all the customer

CALCULATE(
SUM(OrdersBooked),
ALL(Customers)
)

2) I want to show sum of orders booked per customer

SUM(OrdersBooked)

 

With the ALL() function, the first measure will ignore the Customer filter, and the second measure will consider the Customer filter to show the sum for the specific customer(s) filtered.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

View solution in original post

Hi,

 

The second measure (below), will be responsive to any filter applied in the report, so if you add a Slicer for the customers and select specific customers, it will show the OrdersBooked only for them.

SUM(OrdersBooked)

 

Hope it helps!


Best regards,
Joao Ribeiro

View solution in original post

7 REPLIES 7
shantupm5
Helper III
Helper III

Thank you so much! It did help me with the solution you provided!

 

Have a good one!

joaoribeiro
Kudo Kingpin
Kudo Kingpin

Hi @shantupm5 ,

I believe you should create the two metrics changing the filter, as shown below:

1) Sum of Orders booked for all the customer

CALCULATE(
SUM(OrdersBooked),
ALL(Customers)
)

2) I want to show sum of orders booked per customer

SUM(OrdersBooked)

 

With the ALL() function, the first measure will ignore the Customer filter, and the second measure will consider the Customer filter to show the sum for the specific customer(s) filtered.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

Hello, 

 

First issue did resolve, but looks like i did not get the second solution "and the second measure will consider the Customer filter to show the sum for the specific customer(s) filtered." I dont see the formula filtering out or showing up any filters to select the list of customers to manually filter. Please advice

 

 

Hi,

 

The second measure (below), will be responsive to any filter applied in the report, so if you add a Slicer for the customers and select specific customers, it will show the OrdersBooked only for them.

SUM(OrdersBooked)

 

Hope it helps!


Best regards,
Joao Ribeiro

Hello Joao,

 

Hope you are doing well,

 

I am futher looking for some help for the soultion you provided yesterday.

If we select multiple values from the Slicer, can we get the bar grarh with multiple values. instead of giving the bars with sum of the selected filters from slicerw.

 

For ex: If i select two or more values from the slicer, i would expect mutilple bar for each value i have selected from Slicer.

Please advice

shantupm5_0-1680768677557.png

 

amitchandak
Super User
Super User

@shantupm5 . Create a measure like

 

Averagex(Values(Customer[Customer]), Calculate(Count(Table[Order ID])) )

 Thanks Amit for your quick response..

 

I think this solultion is not working, What i am looking is to apply a filter for one of the line graph out of two, If i select values from the filter, the filter should be applied only for one line graph out of two available in chart.

Do we have any solution for this requirement? Please advice

 

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.