Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi all
I need a calculated column that sums the distinct count values in the 'Pack' column for the concat of the columns 'Location' and 'Manufacturing line'.
To give an example here is the following table:
Location XX and Line 1 has just one type of pack (NR), therefore the result should be 1 (column F)
Location XX and Line 2 has just two types of pack: NR and Ref, therefore the result should be 2 in column F.
How can i replicated this excel formulas into just one calculated column in Power BI?
Excel attached: Duplicate.xlsx
Thanks.
Solved! Go to Solution.
Hi,
This calculated column formula works
Column = CALCULATE(DISTINCTCOUNT(Data[Pack]),FILTER(Data,Data[Location]=EARLIER(Data[Location])&&Data[Manufacturing line]=EARLIER(Data[Manufacturing line])))
Hope this helps.
Hi,
This calculated column formula works
Column = CALCULATE(DISTINCTCOUNT(Data[Pack]),FILTER(Data,Data[Location]=EARLIER(Data[Location])&&Data[Manufacturing line]=EARLIER(Data[Manufacturing line])))
Hope this helps.
You are welcome. Thank you for your kind words.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 39 | |
| 39 | |
| 39 |