Forum Discussion
nps59718
8 years agoFrequent Visitor
A function 'CALCULATE' has been used in a True/False expression - Simple Date comparison
Hi There, I'm looking for a more elegant way sum based on a prior business day calculation. The following *does work* but will get a little more cumbersome when doing MTD or YTD calculations: ...
- 8 years ago
Try this one
Prior Day Invoiced = VAR PreviousBusinessDay = [Priorbusinessday] RETURN CALCULATE ( SUM ( 'Sales Ledger Transactions'[Net Sales] ), 'Sales Ledger Transactions'[Fact Attributes.Source Sale Type Code] = "INVOICED", 'Sales Ledger Transactions'[Date.Date] = PreviousBusinessDay )
Anonymous
7 years agoNot applicable
Worked for hours on this problem before I found this solution. Thank you Zubair_Muhammad !
Any help explaining why it wouldn't work without creating the variable? I still don't understand the error fully.
rq
Doodle
Advocate II
6 years agoSame here.
Any elaboration is appreciated.