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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Dobrodej
Frequent Visitor

Market share for shop and category

 

I am trying to calculated market share for below table but have some problems to calculate it properly...

Could you please help me to create correct calculated measures for this table.

Dobrodej_1-1723486038119.png
for example category Cycling Backpacks  includes 3 manufacturer,  shop tisimo has only 2, so now brand overview table is missing 1 brand and shows incorrect results.

 

Dobrodej_2-1723486134809.png

 

my measures 

__all_selected_Clicks_shop =CALCULATE(sum('input'[click_count]))
__clicks_brand =CALCULATE(sum('input'[click_count]), ALLEXCEPT('input','input'[manufacturer_name],'input'[category_name_lvl_7],input[click_count]))
__clicks_total_brand = CALCULATE(sum(input[click_count]),REMOVEFILTERS(),VALUES(input[category_name_lvl_7]))
__market_share =
var _totalCategories=CALCULATE(sum(input[click_count]),REMOVEFILTERS(),VALUES(input[category_name_lvl_7]))
var _brandTotal =CALCULATE(sum(input[click_count]),REMOVEFILTERS(),VALUES(input[manufacturer_name]))
RETURN (_brandTotal/_totalCategories)
__my_share =
var _totalCategories=CALCULATE(sum(input[click_count]),REMOVEFILTERS(),VALUES(input[category_name_lvl_7]))
var _shopTotal =CALCULATE(sum(input[click_count]),ALLSELECTED(input[shop_name]))
RETURN (_shopTotal/_totalCategories)



expected result is

Dobrodej_3-1723486134812.png

 


expected result should also react to click date filter and avg price filter.

Thanks

11 REPLIES 11
Dobrodej
Frequent Visitor

hi, if i filter only one filter  cycling backpack or shop_name, it shows data properly . but if i keep both of them it shows only combintion of these two filters ( something like inner join 😉 )

 

Anonymous
Not applicable

Hi @Dobrodej ,

 

Trying to change the relationship between these two tables, the flow of relationship from child class to parent class is changed to unidirectional.

 

Best regards,
Community Support Team_ Scott Chang

 

 

 

Hi, the main problem is that currently my measures are incorrect, and i cant create a table with expected result.

 

click_dateclick_countproduct_idmanufacturer_nameaverage_pricecategory_name_lvl_7shop_name
29/04/202411035690952HOT411Cycling dresseskolo
29/04/202451035690952HOT411Cycling dresseskolo
29/07/202411264358671 502Cycling backpacksosport
01/07/202411273318287Magoon474Cycling backpacksosport
15/07/202411269033766Magoon488Cycling backpacksweb1ue
03/06/202411221786366Magoon446Cycling glovesosport
13/05/202411022001307Magoon425Cycling dressesosport
05/02/202411142597990HOT327Cycling dresseskolo
01/07/202411120514931HOT474Cycling backpackskolo
20/05/20241755696670HOT432Cycling backpacksweb1ue


so if i will use 2 slicers
category  
cycling backpacks 
 shop  osport 
the result should be 

manufacturerallshare allshopshare shop
HOT240%120%
Magoon240% 0%
(blank)120%120%


thanks

Dobrodej
Frequent Visitor

unfortunately the sysetem doesnt allow me to send power bi file.
currently modele shows only 2 brand. 
for example category  cycling backpacks contains 3 manufacturer
but shop  osport sells only 2 of them 
the result with these two filters should be like this

manufacturerallshare allshopshare shop
HOT240%120%
Magoon240% 0%
(blank)120%120%


the result with shop filter should be 

slicer: shop    
Row Labelsallshare allshopshare shop
HOT862% 0%
Magoon431%323%
(blank)18%18%
Grand Total13   
the result with category filter     
slicer:  category    
Row Labelsallshare allshop (all shops)share shop
HOT240%240%
Magoon240%240%
(blank)120%120%
Grand Total5 5 


thanks

 

Dobrodej
Frequent Visitor

click_dateclick_countproduct_idmanufacturer_nameaverage_pricecategory_name_lvl_7shop_name
29/04/202411035690952HOT411Cycling dresseskolo
29/04/202451035690952HOT411Cycling dresseskolo
29/07/202411264358671 502Cycling backpacksosport
01/07/202411273318287Magoon474Cycling backpacksosport
15/07/202411269033766Magoon488Cycling backpacksweb1ue
03/06/202411221786366Magoon446Cycling glovesosport
13/05/202411022001307Magoon425Cycling dressesosport
05/02/202411142597990HOT327Cycling dresseskolo
01/07/202411120514931HOT474Cycling backpackskolo
20/05/20241755696670HOT432Cycling backpacksweb1ue

Hi,

Baed on this 1 table that you have shared, show the expected result clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

table 

click_dateclick_countproduct_idmanufacturer_nameaverage_pricecategory_name_lvl_7shop_name
29/04/202411035690952HOT411Cycling dresseskolo
29/04/202451035690952HOT411Cycling dresseskolo
29/07/202411264358671 502Cycling backpacksosport
01/07/202411273318287Magoon474Cycling backpacksosport
15/07/202411269033766Magoon488Cycling backpacksweb1ue
03/06/202411221786366Magoon446Cycling glovesosport
13/05/202411022001307Magoon425Cycling dressesosport
05/02/202411142597990HOT327Cycling dresseskolo
01/07/202411120514931HOT474Cycling backpackskolo
20/05/20241755696670HOT432Cycling backpacksweb1ue


so if i will use 2 slicers
category  
cycling backpacks 
 shop  osport 
the result should be 

manufacturerallshare allshopshare shop
HOT240%120%
Magoon240% 0%
(blank)120%120%


thanks

hi,
so based on this table the result should be 

manufacturerallshare allshopshare shop
HOT240%120%
Magoon240% 0%
(blank)120%120%


thanks for your help!

 

Just cannot understand the expected result at all.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Dobrodej
Frequent Visitor

tables witout filters lookd like this 

Dobrodej_0-1723487240545.png

Thanks

 

 

Anonymous
Not applicable

Hi @Dobrodej ,

 

Do you keep only the [manufacturer_name] field and filter Cycling Backpacks, does it return the expected three brands?If so, please provide sample data.

 

Best regards,
Community Support Team_ Scott Chang

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.