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
pink125365
New Member

DAX Calculations

I am facing an issue with the comment below. Any help greatly appreaceated!
"DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."

 

SalesOnlineWatches= CALCULATE(SUM(TJLSalesData[Sales]),FILTER(TJLSalesData,TJLSalesData[StoreID]="4"||TJLSalesData[CatID]="1"||TJLSalesData[MatID]="1"))
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I do not know how your datamodel looks like, but I assume that in your datamodel, storeID / CatID / MatID are all number format. Please try the below measure if it works.

 

 

SalesOnlineWatches =
CALCULATE (
    SUM ( TJLSalesData[Sales] ),
    FILTER (
        TJLSalesData,
        TJLSalesData[StoreID] = 4
            || TJLSalesData[CatID] = 1
            || TJLSalesData[MatID] = 1
    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @pink125365,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Jihwan_Kim
Super User
Super User

Hi,

I do not know how your datamodel looks like, but I assume that in your datamodel, storeID / CatID / MatID are all number format. Please try the below measure if it works.

 

 

SalesOnlineWatches =
CALCULATE (
    SUM ( TJLSalesData[Sales] ),
    FILTER (
        TJLSalesData,
        TJLSalesData[StoreID] = 4
            || TJLSalesData[CatID] = 1
            || TJLSalesData[MatID] = 1
    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.

Top Solution Authors