cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Anonymous
Not applicable

## Market Share using allselected by month

Hello,

Is there a way to get a mesure calculating market share by month ?

``market share = DIVIDE(SUM('Fact SKU products'[sales conversion]), CALCULATE(SUM('Fact SKU products'[sales conversion]), ALLEXCEPT('Fact SKU products', 'Fact SKU products'[date])), 0)``

I'm currently issuing a problem that give me for denominator in the mesure the sum of all sales without taking into account my month columns in my table

(brands names are on the left hiding on the screenshot)

On the screenshot we can see that "blank" month is about 20.61% of my raw data, so the june column isn't share for june only but for both june and blank month

Thanks a lot for helping

Edit : table issued a bug with blank column, dax formula seems to be good as described in solution

Math

1 ACCEPTED SOLUTION
Community Champion

@Anonymous ,

Maybe this one:

``market share = DIVIDE(SUM('Fact SKU products'[sales conversion]), CALCULATE(SUM('Fact SKU products'[sales conversion]), ALL(TABLE[BRAND_NAME])), 0)``

Proud to be a Super User!

2 REPLIES 2
Community Champion

@Anonymous ,

Maybe this one:

``market share = DIVIDE(SUM('Fact SKU products'[sales conversion]), CALCULATE(SUM('Fact SKU products'[sales conversion]), ALL(TABLE[BRAND_NAME])), 0)``

Proud to be a Super User!

Anonymous
Not applicable

Thank you Ricardo,

`market share = DIVIDE(SUM('Fact SKU products'[sales conversion]), CALCULATE(SUM('Fact SKU products'[sales conversion]), ALL('Fact SKU products'[BRAND_NAME])), 0)`

is working fine as my table had another not explained issue, recreated the matrice automatically deleted blank values and total is per category (month or another variable)

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors