Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |