Forum Discussion

zan0n's avatar
zan0n
Frequent Visitor
2 years ago
Solved

Sort Sold and Not Sold

Hello,

Im trying to sort what was sold by a salesperson and what was not. The intent is to motivate them to sell what they havent sold, so they see what they havent sold together with how much they couldve made.

Relationships as follow:
dSupervisores[cod_supervisor] -> dVendedores[cod_vendedor] -> fEmprestimos[cod_vendedor]
dEsmprestimos_tabelas_tipo[tabtipcodigo] -> dEmprestimos_tabelas[tabcodigo] -> fEmprestimos[tabcodigo]

So it would be what dEmprestimos_tabelas_tipos[convenio_pai] dSupervisores[Supervisor Agrupado] sold and what it didnt, acompanied with the values from fEmprestimos that i already have. 
Expected result is:
Sold

convenio_paiValue
B31
C34
D44


Not Sold

convenio_paiValue
X5
Y32
Z115


Please let me know if the info and question are confusing. 
Apreciate the help!

3 Replies

    • zan0n's avatar
      zan0n
      Frequent Visitor

      Thank you for sharing the video! Helped me to understand the problem better.
      I am still having trouble, i feel like youve put the solution right in front of my eyes but i still cant figure it out.
      I cannot add the values of the categories they didnt sell. I have a measure SUM(fEmprestimos[valor_liquido]) that i would like to have next to the categories they didnt sell, showing what he coulve sold.
      Your reply mentions i need to sum up not sold, but i, lost on where to apply that. 

      Im trying to figure it out. Apreciate your help so far, and whatever else you can help me with!

      • zan0n's avatar
        zan0n
        Frequent Visitor

        Solved using Amit's video and using a measure CALCULATE(VALUES, REMOVEFILTER(dSupervisores), REMOVEFILTER(dVendedores)). Thank you Amit!