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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Invesco
Helper V
Helper V

Amend Measure to work on id based on letters and numbers

Hi Experts

 

See previous question with sample data 

https://community.fabric.microsoft.com/t5/Desktop/Identify-System-Approved-data-point-based-on-clien... 

 

How would you amend the calulcated column measure to work using an ID column that has both numbers and letters ID column is

gjdfg546dg5653sfsf format

 

Calculated Column Measure

IF (
    'Table'[Status] = "System Approved",
    IF (
        COUNTROWS (
            FILTER (
                'Table',
                'Table'[ID] = EARLIER('Table'[ID]) &&
                'Table'[Status] = "Authorised"
            )
        ) > 0,
        1,
        0
    ),
   0
)

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Invesco ,

Didn't quite understand what you meant, I made simple samples and you can check the results as follows.

vtianyichmsft_0-1734421898227.png

 

Best regards,
Community Support Team_ Scott Chang

 

 

View solution in original post

Anonymous
Not applicable

Hi @Invesco ,

This seems to be two kinds of logic and has nothing to do with your ID, check the results below:

vtianyichmsft_0-1734423179874.png

Check = IF([Status]="Authorised",1,0)

Measure = var _t = ADDCOLUMNS('Table',"Check2",COUNTAX(FILTER(ALL('Table'),[ID]=EARLIER([ID])&&[Status]="System Approved"),[ID]))
RETURN MAXX(FILTER(_t,[Check]=0),[Check2])

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

9 REPLIES 9
Anonymous
Not applicable

Hi @Invesco ,

This computed column also applies to the mix of letters and numbers you mentioned, try to understand EARLIER(). As you said, it will group all “abc1” into one group for calculation, just like 1, 23, 34 in your sample data.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Hi Community Help - slightly confused - can you help please

Anonymous
Not applicable

Hi @Invesco ,

What are your expected results?

 

Best regards,
Community Support Team_ Scott Chang

Hi Community the expected end result is the same. The question is how do i handle the numbers and letters in the ID column using EARLIER??

Anonymous
Not applicable

Hi @Invesco ,

Didn't quite understand what you meant, I made simple samples and you can check the results as follows.

vtianyichmsft_0-1734421898227.png

 

Best regards,
Community Support Team_ Scott Chang

 

 

Hi Commnity - See the following

I am trying to identify all data points in my FACT Table where we have clients that have the same ID and have Status as Authorised and System Apporved, so ID 1 has Status of Authorised and System Apporved in new column add 1 against System Apporved as shown else 0. Likewise ID 23. 

 

IDStatusFlag
1asaAuthorised0
1asaSystem Approved1
sdas23Authorised0
sdas23System Approved1
34Authorised0
34Pipeline0
45Rejected0
64Pipeline0
56Pipeline0

 

Anonymous
Not applicable

Hi @Invesco ,

This seems to be two kinds of logic and has nothing to do with your ID, check the results below:

vtianyichmsft_0-1734423179874.png

Check = IF([Status]="Authorised",1,0)

Measure = var _t = ADDCOLUMNS('Table',"Check2",COUNTAX(FILTER(ALL('Table'),[ID]=EARLIER([ID])&&[Status]="System Approved"),[ID]))
RETURN MAXX(FILTER(_t,[Check]=0),[Check2])

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Invesco
Helper V
Helper V

Hi impossible the IDs are a mixture of both.

Anonymous
Not applicable

just make sure the column data type is text not numeric

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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