Forum Discussion
Effectivizar dax
Good day, I need your help to be able to make effective a Dax which is ceasing to be effective because each time they are adding more IF, due to the variation of rates that are happening lately in the banks I have to make a recalculation depending on the day of update.
For each rate update I am creating a new table with the new rates and making a concord of queries to put the new values in each type of quota, this leads to many new columns being added to the base, would there be any way to do it with variables the recalculation?, attached example of DAX of current calculation.
Term | Inverse |
| 12 | 2,273714372 |
| 15 | 2,364325044 |
| 18 | 2,486005891 |
| 21 | 2,601584784 |
| 24 | 2,631063657 |
| 30 | 2,701546963 |
| 36 | 2,786905596 |
| 48 | 2,890684246 |
TASAS06052024
| Term | capital |
| 12 | 2,21432009 |
| 15 | 2,29367352 |
| 18 | 2,40365958 |
| 21 | 2,5085204 |
| 24 | 2,53135701 |
| 30 | 2,59101484 |
| 36 | 2,66540402 |
| 48 | 2,75483515 |
CREDIT TABLE
| cant_cuotas | capital |
| 12 | $ 1.000.000,00 |
| 15 | $ 151.550,00 |
| 18 | $ 151.881,00 |
| 21 | $ 1.100.000,00 |
| 24 | $ 141.848,00 |
| 30 | $ 1.515.888,00 |
| 36 | $ 11.588,00 |
| 48 | $ 1.588.448,00 |
4 Replies
- AnonymousNot applicable
Hi Syndicate_Admin ,
To create a table containing each rate and its effective date, try the following expression. If the problem persists.Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Capital Recalculation Loan = VAR UpdateDate = MAX(SANTANDER_CREDITOSORIGINADOS[ClosesHigh]) VAR ApplicableRate = LOOKUPVALUE( Rates[InverseRate], Rates[RateDate], CALCULATE( MAX(Rates[RateDate]), FILTER( Rates, Rates[RateDate] <= UpdateDate ) ) ) RETURN ROUND( SANTANDER_CREDITOSORIGINADOS[CapitalOrder] / ApplicableRate, -2 )Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Syndicate_AdminAdministrator
Good afternoon, thank you very much for your answer, I have the .pbix file set up and ready to attach but it does not allow me to attach it, could you provide me with the option that allows me to attach it.
- AnonymousNot applicable
Hi Syndicate_Admin ,
You can sign out of your account in power bi desktop and then save the pbix file and upload it.
You can also change the sensitivity of the file to public and then try to upload it.Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Syndicate_AdminAdministrator
Good afternoon, thank you very much for answering my question, but the system does not allow you to upload .pbix files, attached screenshot of the error, I don't know if I have to have a special permission or I am doing something wrongly, I would appreciate your answer.
Thank you very much in advance.