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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

i need to create a dax measure to create a percentage and colour banding

I need to create a measure which calculates percentage of units completed into the following categories:

Gold >95%, Green 80 -95%, Amber 65-79%, Red <65%

 

currently the units completed are whole numbers 

 

how can i create colour groups as well 

 

this will act as a KPI to show which colour group each person is in based on the number of units completed 

 

 

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file.  Show the expected result clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

i cant share the data but i need a dax measure to show different band groups catergorised by colours based on % values. 

 

For example i have units due and units completed and units submitted.

 

i need to create 4 bands to show how many units completed out of due. 

 

Gold >95%, Green 80 -95%, Amber 65-79%, Red <65%

 

therefore, if there are 50 units out 50 it should be gold

and 50 out of 60 should be green 

 

Anonymous
Not applicable

@123abc hi thank you for replying.

 

i have used your dax measure for colour banding however it is showing them all as Red even if its 100%

123abc
Community Champion
Community Champion

Create a DAX measure to calculate the percentage of units completed:

Completion Percentage = DIVIDE(SUM(YourTable[Units Completed]), COUNTROWS(YourTable), 0)

 

This measure uses the DIVIDE function to calculate the percentage of units completed. It sums up the "Units Completed" column and divides it by the total number of rows in the table.

  1. Create a DAX measure to determine the color band:

Color Band =
SWITCH(TRUE(),
[Completion Percentage] > 95, "Gold",
[Completion Percentage] >= 80, "Green",
[Completion Percentage] >= 65, "Amber",
"Red"
)

 

This measure uses the SWITCH function to assign a color band based on the percentage calculated in the previous step. It checks the value of the "Completion Percentage" measure against your specified thresholds and assigns the appropriate color.

Now, when you use these measures in your visualizations, you'll see the "Completion Percentage" and "Color Band" for each person, and the "Color Band" will categorize them into Gold, Green, Amber, or Red based on the completion percentage.

Make sure to replace "YourTable" with the actual name of your table and "Units Completed" with the actual name of your column containing the units completed data in your Power BI dataset.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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