Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Sirs,
I'm having trouble converting this sql query to dax.
SELECT SUM(VALOR)
FROM TB_Lancamentos
WHERE TipoLancamento = 'RPIU'
AND NOT EXISTS ( SELECT ID_Lancamento
FROM TB_Lancamentos
WHERE TipoLancamento = 'ARPIU'
AND ID_Lancamento_Pai NOT IN ( SELECT ID_Lancamento
FROM TB_Lancamentos
WHERE TipoLancamento = 'RPIU'
)
);
Can you help me?
Thanks.
Instead of trying to convert apples to oranges (also known as "fighting the API") you will want to write down the business question you are planning to answer, and then you can construct your Power Query or DAX code step by step to solve that question.
Please provide sample data in usable format (not as a picture) and show the expected outcome.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 26 | |
| 17 | |
| 11 | |
| 10 |