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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need help to get solve on Custom KPI

Hello All,

 

I have three tables.

1:- Project ID master

2::-  Contribution

3:- Billed Utilization

 

I have created relation with project id from Project ID master to rest of tables.

In contribution i have actual contri and deal conti values.

now i have written a measure as Contri that gives difference between deal contribution and actual contribution.

And In Billed Utilization table i have measure  BU that gives the Billed Utilization values.

Now i am trying to create a traffic signal by comapring below conditions using these two mesure values.

 

For Contribution:-

 

Traffic1 = SWITCH(TRUE(),
	[Contri]=BLANK(),0,
	[Contri]>=0.10,1,
	[Contri]<0.00,2,
	[Contri]>0.00 && [Contri]<0.10,3,
		BLANK())
    

Traffic 1.PNG

 

For BU:-

 

Traffic2 = SWITCH(TRUE(),
	[_BU]=BLANK(),0,
	[_BU]>=0.92,1,
	[_BU]<=0.85,2,
    [_BU]>0.85 && [_BU]<0.92,3,
	BLANK()
	)
    

Traffic 2.PNG

 

These both condtions (Measures) are giving the perfect results.

 

Now I have another condtion(Measure) which gives the final result based on these both traffic1 and traffic2 conditions result.

 

Final:-

 

Final = SWITCH(TRUE(), 
	[Traffic1]=0 && [Traffic2]=0,0,
	[Traffic1]=0 && [Traffic2]=[Traffic2],[Traffic2],
	[Traffic1]=[Traffic1] && [Traffic2]=0,[Traffic1],
	[Traffic1]=1 && [Traffic2]=1,1,
	[Traffic1]=2 && [Traffic2]=2,2,
	[Traffic1]=3 && [Traffic2]=3,3,
	[Traffic1]=1 && [Traffic2]=2,2,
	[Traffic1]=1 && [Traffic2]=3,3,
	[Traffic1]=2 && [Traffic2]=1,2,
	[Traffic1]=2 && [Traffic2]=3,3,
	[Traffic1]=3 && [Traffic2]=1,3,
	[Traffic1]=3 && [Traffic2]=2,3,
	BLANK())

 

And the result also seems perfect as we can see in below image.

Final.PNG

 

Now I am trying to create the traffic signal(Calculated Column) using custom kpi's and the condition is as below.

 

Final2:-

 

Final2 = SWITCH(TRUE(), 
	[Final] = 1 ,"https://www.iconfinder.com/icons/38793/download/png/32",
	[Final] = 2 , "https://www.iconfinder.com/icons/38831/download/png/32",
	[Final] = 3 , "https://www.iconfinder.com/icons/38864/download/png/32",""
	)

But the Result is not that i am expecting.

Final2.PNG

Final3.PNG

 

I have been stuggling with these from last three days.

I tried lots of ways like, instead of Final, i have written calculated column with same condition that i have written in Final measure and given the result as to show these icons that i am using, but theres no difference with the result.

A Simple Calculated column switch condition.. but still it is not able to give correct output.

 

Can anyone please suggest me, how can i solve this.

I ll be soo thankful to you.

 

If you need my pbix i am ready to share.

 

 

Thanks,

Mohan V

 

 

 

 

 

 

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

Based on your screenshot, you can see the first entry under same Project ID always returns BLANK() on your Final2 measure. Does Contri or BU measure have calculation like comparing with previous entry? 

 

Can you share your .pbix with sample data?

 

Regards,

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.