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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
andywil456
Advocate II
Advocate II

text to type error message

I'm trying to use a calculate formula to sum our out going per payment terms. The formula i'm using is

CALCULATE(SUM('supplier pymt data'[Supplier Amount]),Table1[payment category]),

 

but i'm getting the following error message in relation to payment category

Cannot convert value '0.1 Pre payment' of type Text to type True/False.

 

 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@andywil456

 

Try a measure like

 

total =
CALCULATE (
    SUM ( 'supplier pymt data'[Supplier Amount] ),
    FILTER (
        'supplier pymt data',
        CONTAINS (
            Table1,
            Table1[payment category], 'supplier pymt data'[payment category]
        )
    )
)

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee

@andywil456

 

Try a measure like

 

total =
CALCULATE (
    SUM ( 'supplier pymt data'[Supplier Amount] ),
    FILTER (
        'supplier pymt data',
        CONTAINS (
            Table1,
            Table1[payment category], 'supplier pymt data'[payment category]
        )
    )
)
Nhallquist
Helper V
Helper V

Dax isn't my native language, but I'm pretty sure that CALCULATE is a function where you filter the table results for a specific value.  The error is telling that you it can't evaluate your filter expression for the CALCULATE function.  A good site to use for DAX Expressions is here and a definition for CALCULATE is below.

 

 

CALCULATE(<expression>,<filter1>,<filter2>…)Evaluates an expression in a context that is modified by the specified filters.

 

Nate

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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