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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Request for support in creation of two measures

Hi,
 
I'm writing with request for support in creation of two measures in my model which is gathering market data from different sources.
 
  1. Market share - brands quantities or values calculated to market eqivalents but providing results equal to 100% on each level, independently from periods (years, quarters, months) and from regions and assigned consultants to them
  2. Penetration - above market share of single consultant calculated to average market share for selected brand.
 
1.jpg
 
I prepared dummy model which I can share.
I'd be thankfull for help / tips.
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Does market share require a percentage result, if yes, see the solution below.

 

Sample data

vstephenmsft_0-1642749404793.png

You can group by year and market to calculate the number of brands (without deduplication). The measure is as follows.

Brand quantities =
CALCULATE (
    COUNT ( 'Table'[Brand] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Year] = MAX ( 'Table'[Year] )
            && [Market] = MAX ( 'Table'[Market] )
    )
)

vstephenmsft_1-1642749485571.png

Percentage = DIVIDE([Brand quantities],CALCULATE(COUNT('Table'[Brand]),ALLSELECTED('Table')))

vstephenmsft_2-1642749647903.png

 

Regarding Penetration, it is better to give an expected result and explain it.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Does market share require a percentage result, if yes, see the solution below.

 

Sample data

vstephenmsft_0-1642749404793.png

You can group by year and market to calculate the number of brands (without deduplication). The measure is as follows.

Brand quantities =
CALCULATE (
    COUNT ( 'Table'[Brand] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Year] = MAX ( 'Table'[Year] )
            && [Market] = MAX ( 'Table'[Market] )
    )
)

vstephenmsft_1-1642749485571.png

Percentage = DIVIDE([Brand quantities],CALCULATE(COUNT('Table'[Brand]),ALLSELECTED('Table')))

vstephenmsft_2-1642749647903.png

 

Regarding Penetration, it is better to give an expected result and explain it.

 

Best Regards,

Stephen Tao

 

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

@Anonymous , Example measure

Share =  divide( countrows(Table), calculate(countrows(Table), filter(allselected(Table), Table[Market] = max( Table[Market] ) )))

 

Avg Share =

Averagex(values(Table[Consultant]), [Share])

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors