Forum Discussion
Ayuda con indicador variable
Hola comidad tengo el siguiente tema, tengo una medida rapida creada que calcula un procentaje
You could set that store that in a variable, and multiple that by the count of selected values. However, an easier way might be a measure like this one:
Avg Monthly % Contribution = Averagex(Values(Table[Month]), [% Contribucion])
This will calculate the % Contribution for each month and give you the average value.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
3 Replies
- mahoneypatMicrosoft Employee
You could set that store that in a variable, and multiple that by the count of selected values. However, an easier way might be a measure like this one:
Avg Monthly % Contribution = Averagex(Values(Table[Month]), [% Contribucion])
This will calculate the % Contribution for each month and give you the average value.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- daxCommunity Support
Hi RicardoLeivaG ,
I am not clear about your requirement? Did you mean that you will always get 1 as result? If so, you need to check meaurse data tyoe and format to see whether it is demical and whether it shou multiple decimal places. And I don't understand the requirement of 140000000, could you please explain this in details(such as use your sample and expected output)?
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- RicardoLeivaGHelper I
the value of the formula that is expressed as 140,000,000 is the goal per month, what I need is that this value increases if 2 or more months are selected, and that it is only 1 if you select any month.
example
if the user selects january
% Contribution = DIVIDE (SUM ('det_factura20062020' [contribution]); (140000000 * 1))
If you select January and February
% Contribution = DIVIDE (SUM ('det_factura20062020' [contribution]); (140000000 * 2))
if you select June
% Contribution = DIVIDE (SUM ('det_factura20062020' [contribution]); (140000000 * 1))