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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
nniphadk
Frequent Visitor

How to filter text length more than 6

I have a switch statement where in 

SWITCH(TRUE, Transaction = "CREDIT" && Transaction Code = "693" && Receipt which has more than 6 characters)

 

TransactionTransaction CodeReceipt
CREDIT69319100000000000
CREDIT53417341
CREDIT53417341
CREDIT53412001
CREDIT53417341
DEBIT53412001
DEBIT53417341
DEBIT53417341
DEBIT53417341
CREDIT53412001
CREDIT53417341
CREDIT53417341
DEBIT53417341
DEBIT53417341
DEBIT53417341
DEBIT53417341
DEBIT53417341
DEBIT5342411558071
DEBIT53417341
3 REPLIES 3
KNP
Super User
Super User

Either you posted before you wanted to or there's not enough detail in this question.

What are you wanting to do?

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
nniphadk
Frequent Visitor

How do I filter the Receipt column for 6 character lengths or more

Based on what you've told me, drop this measure into your table...

Filter6 = 
SWITCH (
    TRUE (),
    MIN ( Filter6[Transaction] ) = "CREDIT"
        && MIN ( Filter6[Transaction Code] ) = "693"
        && LEN (
            MIN ( Filter6[Receipt] )
        ) > 5, 1
)

 

All very dependent of what your end result needs to be.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors