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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Jacob1832
Frequent Visitor

Average that changes with filter

Ive got a data set with like this
```

LeadSource    Dealer    OurLead    SysSize

A                     Yes         True            2.5

A                     No          False          3.8

B                     No         True            5.6

B                     Yes         False          8.0

```-
I want to create a table that tells me the average of the SysSize column per LeadSource, with a filter based on the Dealer and OurLead column that changes the rows included. So with no filter, it would give an average of 3.15 for A, and 6.8 for B.

 

With the filter of Yes for Dealer, it would be 2.5 for A and 8.0 for B.

With the filter of True for OurLead, it would be 2.5 for A and 5.6 for B. 

With the filter Yes and True, A would be 2.5 and B wouldn't be present
And so on. 

1 ACCEPTED SOLUTION
rohit_singh
Solution Sage
Solution Sage

Hi @Jacob1832 ,

Please try creating this calculated table in DAX

Avg Lead Source =
SUMMARIZE(LeadSource,
LeadSource[LeadSource],
LeadSource[Dealer],
LeadSource[OurLead],
LeadSource[SysSize],
"Avg Sys Size", AVERAGEX(LeadSource, LeadSource[SysSize])
)

 

Please ensure summarization is set to "Average" for Avg Sys Size

rohit_singh_7-1652288962389.png


Based on this, here are the results : 

rohit_singh_0-1652288676165.png

rohit_singh_2-1652288721701.png

rohit_singh_3-1652288761266.png

rohit_singh_6-1652288817250.png

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos!

 

Kind regards,

Rohit

 

 

 




View solution in original post

3 REPLIES 3
rohit_singh
Solution Sage
Solution Sage

Hi @Jacob1832 ,

Please try creating this calculated table in DAX

Avg Lead Source =
SUMMARIZE(LeadSource,
LeadSource[LeadSource],
LeadSource[Dealer],
LeadSource[OurLead],
LeadSource[SysSize],
"Avg Sys Size", AVERAGEX(LeadSource, LeadSource[SysSize])
)

 

Please ensure summarization is set to "Average" for Avg Sys Size

rohit_singh_7-1652288962389.png


Based on this, here are the results : 

rohit_singh_0-1652288676165.png

rohit_singh_2-1652288721701.png

rohit_singh_3-1652288761266.png

rohit_singh_6-1652288817250.png

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos!

 

Kind regards,

Rohit

 

 

 




Thanks so much! Is there a way to create multiple tables that would all filter off the same filters? OurLead and Dealer? Is there anything special to do or if I create another table from the same or a different data set, will that filter work on it?

 

Hi @Jacob1832 ,

No problem. Happy to help. You can create multiple tables from the same table without issue. The only thing to keep in mind if you want to filter both(or multiple) tables using the same filters is that you will need to create additional dimension tables for each filter, and then create a 1:M relationship of each new dimesnion table with the data table. 

rohit_singh_0-1652296633031.png


dim_dealer table has two values yes and no
dim_ourlead has two values true and false

Once you have created the above relationships, use the columns in the dimesnion tables as your filters and both tables will be filtered simultaneously

Kind regards,

Rohit

Appreciate your kudos!😊






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.