The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
RESUELTAS

Calculating with rows of data dynamically

TS-User
Meteoro

Hi! I have a simple gross margin calculation  as set out below (i.e. Gross profit divided by sales). I would use a multi row formula to calculate it, but sometimes I have several months or even weeks of data presented in fields, which would mean that I have to write down a formula for each period separately. Is there a way to make it more dynamic? e.g. determine how many periods there are and then calculate a period specific gross margin at once?

 

Thanks a lot!

 

Problem:    Desired outcome  
         
         
Name201520162017 Name201520162017
Sales1005020 Sales1005020
Gross profit30305 Gross profit30305
     Gross margin0.30.60.25
         
2 RESPUESTAS 2
ponraj
Púlsar

Here is the sample workflow for your case. Hope this is helpful. 

 

WorkflowWorkflowResultsResults

TS-User
Meteoro

thanks! this works great

Etiquetas
Autores con mayor cantidad de soluciones