Forum Discussion
Need urgent help
- 6 years ago
pattajoh
Try this modified measure please:Tax impacted Direct = VAR _INDIRECT = CALCULATE( SUM(Report[Indirect]), ALLEXCEPT(Report,'Code List'[Code])) VAR _DIRECT = CALCULATE( SUM(Report[Direct]), ALLEXCEPT(Report,'Code List'[Code])) RETURN IF( NOT(ISFILTERED('Sup List'[Sup])) && ISBLANK(_DIRECT), _INDIRECT, COALESCE( _INDIRECT * 'Report'[% Direct], BLANK()))________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply š
Thank you so much Fowmy & Ryan for your help,
It worked, however, I have another condition. Where there is no "Direct" value but with an "Indirect" provided, I would still like to
see the "total" summed up for that "Code".
In this case, "Code 30" is what I am referring to.
Regards,
JP
pattajoh
Try this modified measure please:
Tax impacted Direct =
VAR _INDIRECT =
CALCULATE(
SUM(Report[Indirect]),
ALLEXCEPT(Report,'Code List'[Code]))
VAR _DIRECT =
CALCULATE(
SUM(Report[Direct]),
ALLEXCEPT(Report,'Code List'[Code]))
RETURN
IF( NOT(ISFILTERED('Sup List'[Sup])) && ISBLANK(_DIRECT),
_INDIRECT,
COALESCE(
_INDIRECT * 'Report'[% Direct], BLANK()))
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply š
- jpattamthanam6 years agoFrequent Visitor
Hi,
I have an older version of Bi installed on my machine...
what would be an alternative option for COALESCE
Could you share an edit to the measure you helped me with.
Regards,
JP
- Fowmy6 years ago
Super User
After RETURN
replace the following
IF( NOT(ISFILTERED('Sup List'[Sup])) && ISBLANK(_DIRECT),
_INDIRECT,
IF(
_INDIRECT * 'Report'[% Direct]=BLANK(),
_INDIRECT * 'Report'[% Direct]
)
)