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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

What to use if the '<>' operator cant be used?

Hello.

 

I've been trying to create a conditional column and am facing the 'DAX comparison operations do not support comparing values of type Integer with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values' error.

The formula should be something like this (taken from Tableau):

IF [Case Number]= [Case Number (Cases w Article Attached 2020+)] THEN 'Cases with Article attached' ELSE

'Cases without article attached' END

 

My power bi formula:

Cases with Article =
IF('Tech Case Report'[Case Number]<> ISBLANK('Tech Case Report'[Cases With Article attached Report.Case Number]), "Cases with Article Attached",

IF('Tech Case Report'[Case Number]= ISBLANK('Tech Case Report'[Cases With Article attached Report.Case Number]), "Cases without Article"))
 
 
How do I edit this formula without adding the '<>' operator?

Please advise. 
Thanking you.
4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

In you tableau formula, isblank() function doesn't appear, I don't know why you use it in dax. 

vjaneygmsft_0-1625210160203.png

You can try:

Cases with Article =
IF (
    'Tech Case Report'[Case Number] <> 'Tech Case Report'[Cases With Article attached Report.Case Number],
    "Cases with Article Attached",
    "Cases without Article"
)
Cases with Article =
IF (
    'Tech Case Report'[Case Number]
        <> SELECTEDVALUE ( 'Tech Case Report'[Cases With Article attached Report.Case Number] ),
    "Cases with Article Attached",
    "Cases without Article"
)
Cases with Article =
IF (
    ISBLANK ( 'Tech Case Report'[Cases With Article attached Report.Case Number] ),
    IF (
        'Tech Case Report'[Case Number]
            = SELECTEDVALUE ( 'Tech Case Report'[Cases With Article attached Report.Case Number] ),
        "Cases with Article Attached",
        "Cases without Article"
    )
)

If the result isn't correct, please describe your logic or give some data, I need context to correct the code.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello @v-janeyg-msft .

Thank you for your reply.

I tried running your formulas but I didn't get the correct number.

 

Basically, there are 2 excel files which are:

Tech Case Report & Cases with Article attached Report.

These reports are merged.

 

Both of these reports have case numbers (column).

 

So, if both the case number are similar, it shall display "Cases with Article" whereas if it doesn't match it shall display "Cases without Article".

 

I even tried creating 2 separate measures but I find it difficult to use them in conditional columns later. Thus, I need this current formula to be in a conditional column.

 

Diviya_06_1-1625456332128.png

 

There's weirdly a '1' in the visualisation.

 

Please help.

 

 

 

 

Hi, @Anonymous

 

Can you share some sample data and your logic and your desired result? Then we can help you quickly and accurately, because your description is not very clear and we can't judge and test. 

Reference:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

 

Best Regards

Janey Guo

Anonymous
Not applicable

check the syntax first 

//Sales to Previous Year Ratio  
  
= IF( ISBLANK('CalculatedMeasures'[PreviousYearTotalSales])  
   , BLANK()  
   , ( 'CalculatedMeasures'[Total Sales]-'CalculatedMeasures'[PreviousYearTotalSales] )  
      /'CalculatedMeasures'[PreviousYearTotalSales])

Link to official documentation 

screenshot:

Core2Plus_0-1625040849897.png

hope this help.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors