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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
kushalt1996
Frequent Visitor

Trying to calculate total no. of sub-products from fact table.

Hello,

I have Table A (dim table) = This stores product name + sub-product name

I have Table B (fact table) = It has product name column. 

Req - To have total no. of sub products from table B. 

Therefore I created Table C (by grouping the first Table A to get the count of sub-products for each product).

After this I merged Table C with Table B to get the sub-product count for each Product on Table B.

But the sub-product count value was duplicating after merge as I had many entries for Product Name in column.

Now when I am creating a measure to calculate Total no. of sub-product. It also calculates the repeated sub-product count values for each product giving larger values. 

Suggest me some solution for this.

Any formula to sum this column values by not repeating sub-product count value for each product OR Do I need to change the merge operation with something else..

I have attached a snip. wrong values computedwrong values computed

2 REPLIES 2
kushalt1996
Frequent Visitor

We can count from Table A, but I wanted to do it from Table -B.

As Table B I have assumed it to be my fact.

Syk
Super User
Super User

Try this

Total Sub-Products = DISTINCTCOUNT('Table A'[Sub-Product])

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors