Forum Discussion
What does this error mean? And how do I correct? Thanks.
The syntax for this Dax is correct (no squiggly red lines), but I am getting an error.
Revenue =
CALCULATE
(SUM('TABLE'[Sales Amount]),
'TABLE'[Product Category]="Clothes")
-Calculate
(SUM('TABLE'[Sales for Part #001]),
'TABLE'[Product Category]="Shoes",
SUM('TABLE'[Sales for Part #001])<0)
Here is the error message.
How can I correct this. Thanks.
try using filter function in last line to resolve this:
Revenue =
CALCULATE(
SUM('TABLE'[Sales Amount]),
'TABLE'[Product Category] = "Clothes"
)
- CALCULATE(
SUM('TABLE'[Sales for Part #001]),
'TABLE'[Product Category] = "Shoes",
FILTER('TABLE', 'TABLE'[Sales for Part #001] < 0)
)If this helped, Please Subscribe AnalyticPulse on YouTube for future updates:
https://www.youtube.com/@AnalyticPulse
https://instagram.com/analytic_pulse
https://analyticpulse.blogspot.com/Please subscribe CogniJourney On Youtube For Daily fun facts:
https://www.youtube.com/@CogniJourney
Help me grow.
4 Replies
- AnalyticPulse
Solution Sage
try using filter function in last line to resolve this:
Revenue =
CALCULATE(
SUM('TABLE'[Sales Amount]),
'TABLE'[Product Category] = "Clothes"
)
- CALCULATE(
SUM('TABLE'[Sales for Part #001]),
'TABLE'[Product Category] = "Shoes",
FILTER('TABLE', 'TABLE'[Sales for Part #001] < 0)
)If this helped, Please Subscribe AnalyticPulse on YouTube for future updates:
https://www.youtube.com/@AnalyticPulse
https://instagram.com/analytic_pulse
https://analyticpulse.blogspot.com/Please subscribe CogniJourney On Youtube For Daily fun facts:
https://www.youtube.com/@CogniJourney
Help me grow.- AnonymousNot applicable
That worked! THANK YOU !!!!!!!!!!!!!
- AnalyticPulse
Solution Sage
😊 Please subscribe CogniJourney On Youtube For Daily fun facts:
https://www.youtube.com/@CogniJourney