cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abc_777
Resolver III
Resolver III

hi

Spoiler
Hi,

I have column that doesnt have 11 digit phone number. and i want to pick only field that has 11 digits mobile number
not empty or only one or two digit in that field.

what would be the measure.
I know I have wrong to following measure. please correct me just to pick value which has 11 disig mobile numbers only to show on card

Mobile Count = IF(hasonevalue('bm_retail_t ssummary'[MOBILE_NO]), DISTINCTCOUNT('bm_retail_t ssummary'[MOBILE_NO]))


abc_777_0-1646849679357.png

 

1 ACCEPTED SOLUTION

Hi @abc_777 ,

 

The calculated columns are not visible in the Power Query Editor. You can create the custom column in Power Query and then filter for rows with a value of 1.

CustomColumn = if Text.Length([MOBILE_NO]) = 11 then 1 else 0

vkkfmsft_0-1647244136535.png

vkkfmsft_2-1647244461918.png

 

Or create a calculated column and then filter.

 

CalculateColumn = IF ( LEN ( [MOBILE_NO] ) = 11, 1, 0 )

vkkfmsft_3-1647244552801.png

vkkfmsft_4-1647244612994.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

5 REPLIES 5
truptis
Memorable Member
Memorable Member

Hi @abc_777 ,
Try the following steps:
1. create a measure and return length of MOBILE_NO field.
Result_variable= Len(Mobile_No)
2. create a conditional column - If (Result_variable = 11, 1, 0)
Flag = IF(values(Result_variable) = 11, 1, 0)
3. Put a filter on your visual which says Flag = 1 
use visual level filter - basic filtering and select 1

this will filter only those numbers which are having 11 digit mobile number.

If this solution helps you, then please mark it as a solution and hit the thumbs up. Thank you.
Regards,

TruptiS

hi @truptis ,

 

I have created new column but when i go to transform and not see my newly created column so i cant go further

 

 

2. create a conditional column - If (Result_variable = 11, 1, 0)
Flag = IF(values(Result_variable) = 11, 1, 0)
3. Put a filter on your visual which says Flag = 1
use visual level filter - basic filtering and select 1

 

 

thanks

Hi @abc_777 ,

 

The calculated columns are not visible in the Power Query Editor. You can create the custom column in Power Query and then filter for rows with a value of 1.

CustomColumn = if Text.Length([MOBILE_NO]) = 11 then 1 else 0

vkkfmsft_0-1647244136535.png

vkkfmsft_2-1647244461918.png

 

Or create a calculated column and then filter.

 

CalculateColumn = IF ( LEN ( [MOBILE_NO] ) = 11, 1, 0 )

vkkfmsft_3-1647244552801.png

vkkfmsft_4-1647244612994.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

What an awesome solution ,👍

abc_777
Resolver III
Resolver III

Hi,

I have column that doesnt have 11 digit phone number. and i want to pick only field that has 11 digits mobile number
not empty or only one or two digit in that field.

what would be the measure.
I know I have wrong to following measure. please correct me just to pick value which has 11 disig mobile numbers only to show on card

Mobile Count = IF(hasonevalue('bm_retail_t ssummary'[MOBILE_NO]), DISTINCTCOUNT('bm_retail_t ssummary'[MOBILE_NO]))



abc_777_0-1646849732441.png

 

 

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors