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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
manish_g
Frequent Visitor

Dynamic Values of a column

Hello Community, 

  I am facing difficulity with the following scenario

 

There is a table distributors with columns Name, Gender and Amount

 

Another table collector, which contains a measure with count of collectors(no of collectors) 

 

Here I need a chart which shows the gender wise breakdown of avg amount per collector 

(A bar chart with X- axis -- Gender and Y-axis Avg amount per collector) 

 

I would be thankful for your suggestions. 

3 REPLIES 3
MohammadLoran25
Solution Sage
Solution Sage

Hi

Please provide a sample PBI file which contains your data and data model.

ichavarria
Solution Specialist
Solution Specialist

Hi @manish_g,

 

To create the chart that shows the gender-wise breakdown of average amount per collector, I think you could follow these steps:

 

  1. First, you need to create a relationship between the Distributors and Collectors table. To do this, go to the "Modeling" tab and click on "Manage Relationships." Then, create a relationship between the "Name" column in the Distributors table and the "Collector" column in the Collectors table.

  2. Next, create a measure to calculate the average amount per collector. You can do this by going to the "Modeling" tab and clicking on "New Measure." Use the following formula:

    Avg Amount per Collector = SUM(Distributors[Amount])/COUNT(Collectors)

  3. Now, create a new table by going to the "Modeling" tab and clicking on "New Table." In the formula bar, enter the following formula:

    Gender Breakdown = DISTINCT(Distributors[Gender])

  4. Create another measure to calculate the average amount per collector by gender. Use the following formula:

    Avg Amount per Collector by Gender = AVERAGEX( FILTER(Distributors, COUNTROWS(FILTER(Collectors, Collectors[Gender] = Distributors[Gender])) > 0), [Avg Amount per Collector])

    This formula filters the Distributors table to only include those with collectors of the same gender, and then calculates the average amount per collector using the previously created measure.

  5. Finally, create a bar chart by dragging the "Gender" column from the Gender Breakdown table to the X-axis and the "Avg Amount per Collector by Gender" measure to the Y-axis.

 

That should give you a chart that shows the gender-wise breakdown of average amount per collector.

Let me know if it works or if you need any additional help. 

 

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly

 

In point no 4 you have used this Collectors[Gender], but there is no Gender in Collectors. 

Collectors aren't connected to distributors table. Clooector only contains Name, Id and address. 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.