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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.