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
Clint
Helper V
Helper V

Boolean calculations and filters

Hello,
 
I'm trying to write a measure to sum the max possible score for a set of entries in the table based on a SNo of 25 thru 59.  The following measure looks like it should do this from a logical stand point but I get the following error when applying it to a card visual.  MaxiumScore is a field type of whole number as is SNo.
 
M_FC Max Score = CALCULATE(Sum(QPlanCurrent[MaximumScore]),'Qplancurrent'[Sno]>=25<=59)
 
BI error.PNG
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Just noticed, what if you try this:

M_FC Max Score = 
CALCULATE(
    SUM ( QPlanCurrent[MaximumScore] ),
    AND(
        'Qplancurrent'[Sno]>=25,
        'Qplancurrent'[Sno]<=59)
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Be sure to check the those columns, the Max score and the Sno. I'd load them into Power Query, explicitly set the data types and see if there are any errors. Usually things like this happen when there one or just a few rows where a text field, blank, or some thing weird got in there.

Hey Nick,

 

There are errors in the columns for sure but this measure does work

M_Rel Start Max Score = CALCULATE(Sum(QPlanCurrent[MaximumScore]),'Qplancurrent'[Sno]<=24)
 
Anonymous
Not applicable

Just noticed, what if you try this:

M_FC Max Score = 
CALCULATE(
    SUM ( QPlanCurrent[MaximumScore] ),
    AND(
        'Qplancurrent'[Sno]>=25,
        'Qplancurrent'[Sno]<=59)
)

Thanks so much Nick.  The last paren wasn't necessary.  Once I removed it, it worked perfectly and returned the expected Value.  

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.