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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
admin11
Memorable Member
Memorable Member

How to create a column expression to filter certain invoice number ?

Hi All

 

I have below expression working fine :-

_LONG OVERDUE = IF( AR[Customer/Vendor Code] IN { "A10002", "AR10012" }, 0, 1 )
 
I try to convert the above expression to below :-
_LONG OVERDUE INVOICE = IF( AR[AR Invoice Number] IN { "122598" }, 0, 1 )
 
I get error msg below :-
Function 'CONTAINSROW' does not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.
 
My objectives :-
Create a column expression for use for Slicer.
 
Below link is my PBI sameple file :-
 
Paul Yeo
 
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try the below.

 

_LONG OVERDUE INVOICE (JihwanKim) = IF( AR[AR Invoice Number] IN { 122598 }, 0, 1 )
 
I hope it helps.
Thank you very much.
 
Did I answer your question? Mark my post as a solution!

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
PhilipTreacy
Super User
Super User

@admin11 

Hi Paul,

The answer from @Jihwan_Kim  is correct.  I just wanted to add why.

In your original code you were checking for a string (text) becaue you had the Invoice Number in double quotes.

_LONG OVERDUE INVOICE = IF( AR[AR Invoice Number] IN { "122598" }, 0, 1 )

 

But the Invoice Number is a number so you have to supply a number to check (don't use double quotes)

_LONG OVERDUE INVOICE = IF( AR[AR Invoice Number] IN { 122598 }, 0, 1 )

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Jihwan_Kim
Super User
Super User

Hi,

Please try the below.

 

_LONG OVERDUE INVOICE (JihwanKim) = IF( AR[AR Invoice Number] IN { 122598 }, 0, 1 )
 
I hope it helps.
Thank you very much.
 
Did I answer your question? Mark my post as a solution!

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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