Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Ronald123
Resolver III
Resolver III

Function calculate with true/false expression is not allowed

I have the follow warning: A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

 

Whit this measure:

 

Cumulative Supply =
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
'Stock'[Datumverkoop:] = BLANK ()
)
-
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
'Stock'[Datumverkoop:] <> BLANK ()
)

 -------------------------------------------------------------------------------

 

Datumverkoop: = CALCULATE([Laatste transactie:];
Stock[Custom]="geretouneerd")
+CALCULATE([Laatste transactie:];Stock[Custom]="vernietigd")
+CALCULATE([Laatste transactie:];Stock[Custom]="verkocht")
+CALCULATE([1e transactie transactie:];Stock[Custom]="bemanning")
+CALCULATE([Laatste transactie:];Stock[Custom]="gestolen")
+CALCULATE([Laatste transactie:];Stock[Custom]="resource")

 

The measure datumverkoop: has the format date, what is goning wrong?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Ronald123,

Create your measure using the following DAX instead.

Cumulative Supply =
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
FILTER('Stock';'Stock'[Datumverkoop:] = BLANK ())
)
-
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
FILTER('Stock';'Stock'[Datumverkoop:] <> BLANK ())
)




Regards,
Lydia

View solution in original post

4 REPLIES 4
Ronald123
Resolver III
Resolver III

This is the measure of "laatste transactie"

 

Laatste transactie: = MAX(History[EDATE])

 

I hope someone can help my

Anonymous
Not applicable

@Anonymous Not at all. I kown the problem but i dont know the solution? Can you help my to change the measure?

Anonymous
Not applicable

@Ronald123,

Create your measure using the following DAX instead.

Cumulative Supply =
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
FILTER('Stock';'Stock'[Datumverkoop:] = BLANK ())
)
-
CALCULATE (
SUM ( 'Stock'[UNIQUE] );
FILTER (
ALLEXCEPT ( 'Stock'; 'Stock'[GRPCODE] );
'Stock'[DATEPURCH] <= MAX( 'Stock'[DATEPURCH] )
) ;
FILTER('Stock';'Stock'[Datumverkoop:] <> BLANK ())
)




Regards,
Lydia

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.