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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Andreas_P
New Member

How to show the % of a column sum in one table vs the count value of a column from another

 
 

Hi i am looking for some help to setup the below:

  I have setup this very simple model with two tables. Customer_Master and Distribution_Data which shows distribution of products to customer outlets. Connected to each other via the customer_id field.

 

The number you see on the bar chart , first bar for example, shows that product JWRL 700 is at 1569 customers.

Now 1569 is not the whole customer universe. To find this you need to count the different customer_ids from the Customer_master table which includes all customers.

What I want to show is the % of the value shown in the bar chart (which the sum of a column (Distribution of element (0/1) from the Distribution_data table) versus the count of the total customers.

So basically the percentage of the sum of values from one column in one table against the count of a column from another table.

Aim is to see in a second bar on the same chart that 1569 is actually 90% of the total customers.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try New measures

custoomer for product = calculate(count(Distribution_Data[customer_ID])
overall customers = calculate(count(Customer_Master[ID]),all(Distribution_Data))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @Andreas_P 

You could use "ALL" Function as amitchandak said to get it. here are two blog for you refer to:

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

https://radacad.com/now-you-see-me-use-cases-of-all-dax-function-in-power-bi

If you still have problem, please share a simple pbix file and your expected output.

 

Regards,

Lin

Community Support Team _ Lin
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

Try New measures

custoomer for product = calculate(count(Distribution_Data[customer_ID])
overall customers = calculate(count(Customer_Master[ID]),all(Distribution_Data))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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