Forum Discussion
daxbeginner
6 years agoFrequent Visitor
MDX to Dax Code Migration
Hi, I am struggling a bit to rewrite the below MDX code to DAX equivalent: M1: Iif(Isleaf([Invoice].[Invoice ID]),[Measures].[Product Invoice Amount EUR Days Due Date To Payment Date], SUM(D...
- 6 years ago
Hi daxbeginner ,
Maybe you can try this:
M1:
= IF ( ISFILTERED ( 'Invoice'[Invoice ID] ), [Product Invoice Amount EUR Days Due Date To Payment Date], SUMX ( ALLEXCEPT ( 'Invoice', 'Invoice'[Your Level Column] ), [Product Invoice Amount EUR Days Due Date To Payment Date] ) )M2:
= IF ( ISFILTERED ( 'Invoice'[Invoice ID] ), INT ( [Invoiced Amount EUR] ), INT ( SUMX ( ALLEXCEPT ( 'Invoice', 'Invoice'[Your Level Column] ), [Invoiced Amount EUR] ) ) )Best Regards,
IceyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
6 years agoCommunity Support
Hi daxbeginner ,
Maybe you can try this:
M1:
=
IF (
ISFILTERED ( 'Invoice'[Invoice ID] ),
[Product Invoice Amount EUR Days Due Date To Payment Date],
SUMX (
ALLEXCEPT ( 'Invoice', 'Invoice'[Your Level Column] ),
[Product Invoice Amount EUR Days Due Date To Payment Date]
)
)M2:
=
IF (
ISFILTERED ( 'Invoice'[Invoice ID] ),
INT ( [Invoiced Amount EUR] ),
INT (
SUMX (
ALLEXCEPT ( 'Invoice', 'Invoice'[Your Level Column] ),
[Invoiced Amount EUR]
)
)
)Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.