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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Market Share acumulado 12 meses moviles

Hola amigos Expertos en Dax !!

Necesito de su ayuda.

 

Tengo una base de datos con 3 columnas principales.

Fecha, Empresa, USD.

 

Necesito generar una tabla nueva o una medida para calcular el Market Share. Primero como nosotros lo calculamos es de 12 meses moviles al último mes. Me explico: Si estoy en abil 2021, el Valor Total sera el acumulado desde abril 2020 hasta marzo 2021 (12 meses), y así sucesivamente. En base a ese monto total, calculamos el Market Share.

 

Favor su ayuda, no logro llegar a armar una grafica que colocando en el eje "x" los meses, me muestre el acumulado, solo muestra el monto de ese mes.

 

Infinitas gracias por su ayuda.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hello @Anonymous 
You can try quick measure or check this link .

View solution in original post

Anonymous
Not applicable

Hello @Anonymous 
Please check the attached file .

View solution in original post

15 REPLIES 15
Anonymous
Not applicable

Hello @Anonymous 
You can try quick measure or check this link .

Anonymous
Not applicable

@Anonymous  Thank you very much for your support, the solution has been correct.


Additionally. Do you have a solution for the column "MonthID"?, Do you have any ideas or proposals? I checked in the Forum and I have not found anything that can be automatic. At the moment I have incorporated a manual table that makes the relation giving a "MonthID" to the Calendar Table.

Anonymous
Not applicable

Hello @Anonymous 
Please check the attached file .

Anonymous
Not applicable

Hello @Anonymous 

 

The file is in your trash, please upload again.

 

Thanks !

Anonymous
Not applicable

Hello @Anonymous 
I've updated the link. Please check in the previous message.

Anonymous
Not applicable

Very thank you !

Anonymous
Not applicable

Hello @Anonymous 
Have you checked the file? Is it working as expected?
Yes, please mark the solution so it will help others.

Anonymous
Not applicable

Hi @Anonymous 

 

I mark the solution, thanks.

 

But, i need your help!. When i try to make a new mesure, it calculate the Market Share for only one Company (percentage), does not calculate correctly.

 

Please check the attached File 

 

Your prompt reply will be highly appreciated by us.

Anonymous
Not applicable

Hello @Anonymous 
Please update your existing measure "MS Company1" to "MS Company" and use the below code.

MS Company =
VAR Amount =
CALCULATE(
[Rolling Sum],
ALLSELECTED( Sheet1[COMPANY] )
)
RETURN
DIVIDE( [Rolling Sum], Amount )

TarunSharma_0-1620033204193.png

 



Anonymous
Not applicable

Hi! @Anonymous 

It's ok for all Company, but if i want select only 1 or 2 companys?

 

All Companys:

1.PNG2.PNG

 

amitchandak
Super User
Super User

@Anonymous , With help from date Table , you can get last 12 month data like

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Anonymous
Not applicable

Hi @amitchandak, thanks you for your reply!

 

For more details, please see the following table:
This table shows the last 12 months, consider that each month accumulates the add of the previous 12 months.

 

Example jpg:

Image 

 

File in excel format:

Excel 

 

Thanks you

Anonymous
Not applicable

Hello @amitchandak 

 

Can you view my info?

Very thanks you !

@Anonymous , I can see excel. Let me check if I can solve it. 

Anonymous
Not applicable

Very thanks you !

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors