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
sdrco
Regular Visitor

How can I calculate cumulative market share between Products month by month?

Hi Everyone,
 
I have a problem. I can not calculate monthly cumulative market share. How can I calculate cumulative market share between Products, month by month or region by region or staff by staff or unit by unit?
 
Can you help me?
 
Table; goo.gl/gULjxL

 

1 ACCEPTED SOLUTION
v-haibl-msft
Employee
Employee

@sdrco

 

Because your table cannot be accessed, I use some sample data as below.

How can I calculate cumulative market share between Products month by month_1.jpg

 

We can create measures with following formulas.

Cumulative By Month_Product = 
CALCULATE (
    SUM ( Table1[Market Share] ),
    FILTER ( ALLSELECTED ( Table1 ), Table1[Date] <= MAX ( Table1[Date] ) ),
    VALUES ( Table1[Product] )
)
Cumulative By Month_Region = 
CALCULATE (
    SUM ( Table1[Market Share] ),
    FILTER ( ALLSELECTED ( Table1 ), Table1[Date] <= MAX ( Table1[Date] ) ),
    VALUES ( Table1[Region] )
)

How can I calculate cumulative market share between Products month by month_2.jpg

 

Best Regards,

Herbert

View solution in original post

3 REPLIES 3
sdrco
Regular Visitor

Hi all again,

 

Thanks for your answers. I will apply your solutions. But that links working ( http://goo.gl/gULjxL ) please cut and paste your browser or click again please.

 

Thanks.

Serdar.

v-haibl-msft
Employee
Employee

@sdrco

 

Because your table cannot be accessed, I use some sample data as below.

How can I calculate cumulative market share between Products month by month_1.jpg

 

We can create measures with following formulas.

Cumulative By Month_Product = 
CALCULATE (
    SUM ( Table1[Market Share] ),
    FILTER ( ALLSELECTED ( Table1 ), Table1[Date] <= MAX ( Table1[Date] ) ),
    VALUES ( Table1[Product] )
)
Cumulative By Month_Region = 
CALCULATE (
    SUM ( Table1[Market Share] ),
    FILTER ( ALLSELECTED ( Table1 ), Table1[Date] <= MAX ( Table1[Date] ) ),
    VALUES ( Table1[Region] )
)

How can I calculate cumulative market share between Products month by month_2.jpg

 

Best Regards,

Herbert

KGrice
Memorable Member
Memorable Member

Hi @sdrco. The link to your table isn't working for me, so it's hard to give specific help. However, you might find this DAX pattern helpful in writing the DAX for doing cumulative totals. They provide the formulas and quite a few examples to get your started.

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.