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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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?

@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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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