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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NicolaiHolst
Frequent Visitor

Subtotals in PowerBI

Hi all,

 

I have below 3 measures on a calendar dimension in PowerBI:

 

No. of Markets Served = DISTINCTCOUNT(Sales[Business Area])

Total Markets Served = calculate(DISTINCTCOUNT(Sales[Business Area]),'Time',Sources,'Posting Types',ALL(Sales))

Product Cummunality = [No. of Markets Served]/[Total Markets Served]

 

Hence, the Product Cummunality is a measure of how many markets (Business Area) a product is sold in vs. Total numbers of markets. Which provides me with below results:

NicolaiHolst_3-1681820974398.png

Adult footwear is current at 36,36% - though I would like that number to represent an average of rows (marked above). Currently the ratio at 36,36% is too high, since this is calculated on totals of Adult Footwear. No product have a cummunality at 36,36%.

 

I'm not able to make a measure like Average([Product Cummunality]) - So any suggestions on how to solve this case (Measure Tabel??)

 

My data-model looks a below:

NicolaiHolst_2-1681820857893.png

 

Thanks.

2 REPLIES 2
NicolaiHolst
Frequent Visitor

Found a solution.

 

Product Cummunality1 = AVERAGEX(VALUES( Sales[Option] ),([No. of Markets Served]/[Total Markets Served]))
 
Thanks
amitchandak
Super User
Super User

@NicolaiHolst , it may be because of distinct count

 

- No. of Markets Served = Countx(Summarize(sales, Sales[Foodtware], Sales[product], Sales[Business Area]),[Business Area])

- Total Markets Served = calculate(Countx(Summarize(sales, Sales[Foodtware], Sales[product], Sales[Business Area]),[Business Area]) ,'Time',Sources,'Posting Types',ALL(Sales))

 

 

- Product Cummunality = [No. of Markets Served]/[Total Markets Served]

 

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.