Forum Discussion
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.
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 )
1 Reply
- PattemManohar
Community Champion
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 )