Forum Discussion
Anonymous
3 years agoNot applicable
DAX Measure giving error
Anonymous , I am trying to replicate one formula from Business Objects to Power BI DAX which reads as follows. If ([Type] = "Charted") Then (If IsNull([vCountofChanges] Where([Calendar Days] >= ...
- 3 years ago
Hi Anonymous
please try
=
IF (
MAX ( 'Change Requests'[Type] ) = "Charted",
SUMX (
VALUES ( 'Change Requests'[Calendar Days] ),
IF ( 'Change Requests'[Calendar Days] >= [LeadDays], [vCountofChanges], 0 )
)
)
tamerj1
Community Champion
3 years agoHi Anonymous
Please try
=
IF (
MAX ( 'Change Requests'[Type] ) = "Charted",
COALESCE (
ISBLANK (
CALCULATE (
[vCountofChanges],
FILTER ( 'Change Requests', 'Change Requests'[Calendar Days] >= [LeadDays] )
)
),
0
)
)
Anonymous
3 years agoNot applicable
tamerj1 Thanks for your quick response.
I used the DAX given by you and named it Test 2. However, its not giving me any values. Ideally, it should give me the total as 2 because there are overall 2 instances where 'Calendar days' are greater than or equal to 'LeadDays'.
Please refer to below snapshot for your reference.
- tamerj13 years ago
Community Champion
Hi Anonymous
please try
=
IF (
MAX ( 'Change Requests'[Type] ) = "Charted",
SUMX (
VALUES ( 'Change Requests'[Calendar Days] ),
IF ( 'Change Requests'[Calendar Days] >= [LeadDays], [vCountofChanges], 0 )
)
)