Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Don't show total
This is a measure wiht IF another measure don't heave IF, problem happens on the desktop and the service
Total comprometido_old when I expot to Excel R$ 7.400,00
Measuers:
COMPROMETIDO_old = IF(CALCULATE([TOTALPEDIDO] - ([ENTRADACUSTO] + [ENTRADACONTABIL]);RELATEDTABLE(PEDIDO)) < 0 ; 0 ; CALCULATE([TOTALPEDIDO] - ([ENTRADACUSTO] + [ENTRADACONTABIL]);RELATEDTABLE(PEDIDO)))
ENTRADACUSTO = CALCULATE([valor_Custo]; CUSTO[FLAGCOMP] = TRUE())+0
ENTRADACONTABIL = CALCULATE([Valor_Contabil]; CONTABIL[FLAG] = TRUE())+0
TOTALPEDIDO = CALCULATE(SUM(PEDIDO[VALOR_PED]);PROJETOS[ENCERRADO] = 13; PEDIDO[ELIM_PED] <> "L"; PROJETOS[ORDEM] <> 0; ALL(MES[MÊS]); ALL(ANOS[ANO]))
Well, the problem is that it does not show the total, compromised_old is a measure of the monetary type, it generates a rest of the fields that I listed above.
Link To Download the PBIX
Please help me =D
Thanks
Solved! Go to Solution.
Hi @Anonymous,
Based on your data, you can try the measure below. The trick is the context. Please check out the demo in the attachment.
PLEASE BE AWARE OF YOUR PRIVACY!
COMPROMETIDO_new = VAR vCom = CALCULATE ( [TOTALPEDIDO] - ( [ENTRADACUSTO] + [ENTRADACONTABIL] ), RELATEDTABLE ( PEDIDO ) ) RETURN IF ( HASONEVALUE ( ORDENS[ORDEM] ) && HASONEVALUE ( PEDIDO[NR_IT_PED] ), IF ( vCom < 0, 0, vCom ), SUMX ( SUMMARIZE ( PEDIDO, ORDENS[ORDEM], ORDENS[PROJETO], PEDIDO[NR_IT_PED], "v", CALCULATE ( [TOTALPEDIDO] - ( [ENTRADACUSTO] + [ENTRADACONTABIL] ), RELATEDTABLE ( PEDIDO ) ) ), IF ( [v] < 0, 0, [v] ) ) )
Best Regards,
Dale
Hi @Anonymous,
Based on your data, you can try the measure below. The trick is the context. Please check out the demo in the attachment.
PLEASE BE AWARE OF YOUR PRIVACY!
COMPROMETIDO_new = VAR vCom = CALCULATE ( [TOTALPEDIDO] - ( [ENTRADACUSTO] + [ENTRADACONTABIL] ), RELATEDTABLE ( PEDIDO ) ) RETURN IF ( HASONEVALUE ( ORDENS[ORDEM] ) && HASONEVALUE ( PEDIDO[NR_IT_PED] ), IF ( vCom < 0, 0, vCom ), SUMX ( SUMMARIZE ( PEDIDO, ORDENS[ORDEM], ORDENS[PROJETO], PEDIDO[NR_IT_PED], "v", CALCULATE ( [TOTALPEDIDO] - ( [ENTRADACUSTO] + [ENTRADACONTABIL] ), RELATEDTABLE ( PEDIDO ) ) ), IF ( [v] < 0, 0, [v] ) ) )
Best Regards,
Dale