cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BarrbC Frequent Visitor
Frequent Visitor

Calculate scores - intervals

hello,

 

I'm struggling with  calculating scoring for my dashboard. There is a number describing the target which a respective representative has reached. Depending on the score it should be categorised to on of the score pools 1,2,3,4 or 5. How to build this formula? should it be something with IF and SWITCH?

 

should there be any dependency on the "source" table with intervals or shall it be a simple formula?

 

scoring testing 2 = switch(true(),and('Customer l data'[vs Target]> "0%",'Customer data'[vs Target] >= "79%"), "1", and('Customer data'[vs Target]>="80%" &&'Customer data'[vs Target]<= "94%"), "2", and('Customer data'[vs Target] >="95%" && 'Customer data'[vs Target]= "99%"), 3, and('Customer data'[vs Target]>="100%" && 'Customer data'[vs Target] <= "109%"), "4", and('Customer data'[vs Target] >= "110%"), "5", 0)

Your help will be much appreciated. It is taking me another day discovering how to build it into PBI. pic1.JPGpic2.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Calculate scores - intervals

@BarrbC Please change the formatting for the field to "Percentage" instead of text type. Then use the below DAX as new column.

 

Score = SWITCH(TRUE(),Test41Switch[Sales]<0,1
		             ,Test41Switch[Sales]*100<=80,2
                     ,Test41Switch[Sales]*100<=95,3
                     ,Test41Switch[Sales]*100<=100,4
                     ,Test41Switch[Sales]*100>100,5
              )  

image.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





View solution in original post

1 REPLY 1
Super User
Super User

Re: Calculate scores - intervals

@BarrbC Please change the formatting for the field to "Percentage" instead of text type. Then use the below DAX as new column.

 

Score = SWITCH(TRUE(),Test41Switch[Sales]<0,1
		             ,Test41Switch[Sales]*100<=80,2
                     ,Test41Switch[Sales]*100<=95,3
                     ,Test41Switch[Sales]*100<=100,4
                     ,Test41Switch[Sales]*100>100,5
              )  

image.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





View solution in original post

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 6 members 1,800 guests
Please welcome our newest community members: