Hi guys,
I need help to convert 2 formulas DAX to M language.
The first one I think it's easy.
Coluna = IF( CALCULATE( COUNTROWS('1_Pagamentos'); FILTER('1_Pagamentos'; '1_Pagamentos'[DT.CRÉDITO]>TODAY()-180&& '1_Pagamentos'[GRUPO]=EARLIER('0_Grupos'[GRUPO])))+ CALCULATE( COUNTROWS('2_Cobrança'); FILTER('2_Cobrança'; '2_Cobrança'[Dt.Emissão]>TODAY()-360&& '2_Cobrança'[GRUPO]=EARLIER('0_Grupos'[GRUPO])))>0; "ATIVO";"INATIVO")
The second I don't know if it's possible.
Exposição = CALCULATE( SUM('1_Pagamentos'[Val. Movimento]); FILTER('1_Pagamentos'; '1_Pagamentos'[DT.CRÉDITO]>EARLIER('Exposição'[DATA])&& '1_Pagamentos'[Dt.Emissão<=EARLIER('Exposição'[DATA])&& '1_Pagamentos'[GRUPO]=EARLIER('Exposição'[GRUPO])))+ CALCULATE( SUM('2_Cobrança'[VAL.SALDO]); FILTER('2_Cobrança'; '2_Cobrança'[Dt.Emissão<=EARLIER('Exposição'[DATA])&& '2_Cobrança'[GRUPO]=EARLIER('Exposição'[GRUPO])))
Thanks
Hi @Lognet,
Why do you want to convert your dax formula to M query? If you create the column with M query, it won't be dynamically in Power BI.
I'm not good at M Query. @ ImkeF and @MarcelBeug may help you.
If you still need help, please share some data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
User | Count |
---|---|
129 | |
61 | |
57 | |
54 | |
43 |
User | Count |
---|---|
122 | |
59 | |
59 | |
54 | |
49 |