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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
FSyed
Regular Visitor

Derive the Values using Group or Rank

Hi

Can someone please assist me how to derive the value for Column "CC_Derive" using the following example

Issue_derive_CC.JPG 

 

Happy to provide the sample data file but not sure how and I can't see the option

 

EmpNo	Name	Amount	CC	Flag	CC_Derive
123	Mr Smith 100	4652	0	4652
123	Mr Smith 200	4659	0	4659
123	Mr Smith 300	999	1	4659
124	Mr X	400	4971	0	4971
124	Mr X	300	999	1	4971
124	Mr X	200	4834	0	4834
124	Mr X	100	4659	0	4659

 

 

1 ACCEPTED SOLUTION
FSyed
Regular Visitor

Hi Alex, 

Thanks for your help appreciate that,  its kind of working but I need to resolve using DAX funtion I guess

After few attempts i think its workingfine 

I have use teh following steps:

Steps_Replace_ReserveCode.JPG

 

Output Example

output examplee.JPG

 

View solution in original post

3 REPLIES 3
FSyed
Regular Visitor

Hi Alex, 

Thanks for your help appreciate that,  its kind of working but I need to resolve using DAX funtion I guess

After few attempts i think its workingfine 

I have use teh following steps:

Steps_Replace_ReserveCode.JPG

 

Output Example

output examplee.JPG

 

AlexisOlson
Super User
Super User

I think this would be easiest in the query editor.

 

FSyed
Regular Visitor

I have used following function (New Column) to derive the Flag values and Max_Amount

col_Flag_999_998=
var var1 = tbl_Distinct_Employee_CC[CostCentre]
RETURN
If(OR (var1 = 498650, var1 = 498655) , 1 ,BLANK())

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.