Forum Discussion

abc_777's avatar
abc_777
Solution Specialist
4 years ago
Solved

hi

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]))



 

 

  • 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

1 Reply

  • truptis's avatar
    truptis
    Community Champion

    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