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
Devildogtevor
New Member

Average on mulitple slicers

Hello All, complete noob here, just about halfway through the first level of guided learning.  I feel hands on playing around is just as useful as formal instruction.  Here is my question, (yes i searched the community and no I couldn't find it, not saying its not there, just I didn't find it.)   Anyway, I have a data set of employee expenses, I have Slicer 1 to filter by Employee, and Slicer 2 to filter by expense type, ie (airfare, meals, hotel, office supplies, etc. ).  I want to create a visual card that will display the average as a result of the slicers, I do no how to  use "Edit Interactions" but the problem is I am not that familiar with DAX yet and I cant get any formulas to work.  Currently, slicer 1 can select multiple people, but slice 2 can only do 1 expense at a time.  Here is an example of what I am trying to accomplish. 

 

 

Sample Data Set (take note the bar visual current shows Jack and John, with the values 1000, and 2600 respectively

 

Emp          Exp Type        Amount              Slicer 1              Slicer 2                 Card Visual (average of airfare for the people selected)

Jack           Airfare           600                   x   Jack                  Airfare                   600 (average of jack and johns airfare by occurance)

Jack           Airfare           400                        Jill

Jack           Hotel             100                   x   John           

Jack           Food              20                        Mary 

Jill              Airfare           300

Jill              Hotel             150

Jill              Food               30

John          Airfare            600

John          Airfare            1100

John          Airfare            500

John          Airfare            400 

Mary          Food              30

 

 

 

 

Thank you!!

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Devildogtevor,

 

Looing at your question you don't need to had any DAX to your calculations you just need to select the Amount to the card visual and then select the Average as the summarization.

 

However if you want to do it by a measure just add the following measure to your data:

AVERAGE EXPENSE = AVERAGE (Table[Expense])

The calculations are based on context given by the slicers so one of the two methods will give you the 600.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Devildogtevor,

 

Looing at your question you don't need to had any DAX to your calculations you just need to select the Amount to the card visual and then select the Average as the summarization.

 

However if you want to do it by a measure just add the following measure to your data:

AVERAGE EXPENSE = AVERAGE (Table[Expense])

The calculations are based on context given by the slicers so one of the two methods will give you the 600.

 

Regards,

MFelix

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.