Forum Discussion
Rotación de Cartera
- 6 years ago
hi aamira
Try this way as below:
Step1:
Add Year and Month column in Dimdate table
Step2:
Create three measure as below:
valor = CALCULATE(SUM(Datos[Saldo Final]),FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])&&DimDate[Month]=12))-CALCULATE(SUM(Datos[Ventas Credito]),FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])&&DimDate[Date]>=MAX(DimDate[Date])))MonthlyPortfolio Rotation = var _maxmonth=CALCULATE(MAX(DimDate[Month]),FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])&&[valor]<0)) return IF(MAX(DimDate[Month])=_maxmonth,CALCULATE([valor],FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])&&DimDate[Month]=_maxmonth+1))/DIVIDE(CALCULATE(SUM(Datos[Ventas Credito])),30),IF(MAX(DimDate[Month])>_maxmonth,30))Result = var _table=SUMMARIZE(DimDate,DimDate[Year],DimDate[Month],"_value",[MonthlyPortfolio Rotation]) return SUMX(_table,[_value])Result:
and here is sample pbix file, please try it.
Regards,
Lin
Lo sentimos, el uso de software de traducción, así que no estoy seguro de entender completamente. ¿Quizás un problema total de medidas? Si es así, ver mi post al respecto aquí: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Además, esta medida rápida, medida totales, la palabra final debe obtener lo que necesita:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
- aamira6 years agoFrequent Visitor
Greetings Community!
Please require your help with calculating portfolio turnover per month
The data used are Credit Sales and the Final Balance
For example, let's look at the case of December 2019:
The value of the Final Balance of the month is taken (December) 11,891 less Credit Sales 5,808 of the month (December), it gives us a result of 6,083; Then we subtract this result from the Credit Sales value of the previous month (November) 5,008, it gives us a result of 1,074, so on until the value is negative. When compared to the Credit Sales of the previous month (October) 4,820 gives us a negative result -3,746.
The last positive value is 1,074, this value must be divided with the value obtained from the formula (Credit Sales / 30), 30 is a representation in days, this value is fixed; In this case 4,820 / 30 = 160,670,520. Now the next calculation is 1,074 / 160,670,520 = 6.69
In this order of ideas, the Portfolio Rotation for the month of December 2019 would be 30 + 30 + 6.69 = 66.69.
- v-lili6-msft6 years ago
Community Support
hi aamira
Could you please share your sample pbix file for us have a test? that will be a great help.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490Regards,
Lin
- aamira6 years agoFrequent Visitor