📔
TPW Staff Resources
  • About This Wiki
  • Staff Resources Read-Only
  • General
    • Acronym Lookup
    • Technology Service Requests
    • UKG Timesheets
  • Video, Chat, and Collaboration
    • Microsoft Teams
      • Creating Meetings
      • Joining Meetings
      • Chat
      • Creating Teams
      • Teams Channels
    • Miro
    • Using Box.com to Share Large Files
  • Working Remotely
    • Getting Started (revise this..)
    • Citrix Receiver
      • Connect from Outside the COA Network
      • Connect from Inside the COA Network
    • NetMotion
    • GoToMyPC
    • Working Remotely from a Mac
      • Troubleshooting AnyConnect for macOS Catalina
      • Resetting Your Network Password from a Mac
  • Computer Management
    • Managing your Network Password
    • ANTI-VIRUS for Computers not Connected to the City’s Network
  • Phone Resources
    • Checking Voicemail | Non-COA phone
    • Checking Voicemail | COA phones
    • Masking personal phone number when calling external numbers
    • Display your COA phone number when calling from your cell phone
    • Phone Forwarding (EC500)
    • Phone Forwarding Alternative (Avaya OneX Communicator)
    • Avaya IX Workplace Setup and User Guide for Mobile Phone
    • Voicemail to Email (Avaya Unified Messaging)
  • Power BI
    • Getting Started
    • How-To
      • Access Power BI Premium Workspace
      • Create a new premium workspace in Power BI
      • Connecting to a Dataflow
      • Access On-premise Data Gateway
      • Publish public link for Power BI item
    • Handover Checklist
      • SMD Signs and Markings Performance Measures
    • Power Query and DAX Formulas
      • Calendar Table
      • Calculate Fiscal Year
      • Conditional Format using DAX
      • Percent Complete on Time
  • Solutions Menu
    • Offerings
    • Do you know about MS Forms?
    • Need a Smart form for public intake?
    • What can SharePoint do?
    • So you need a dynamic Report & Dashboard?
    • What we can build in Knack
    • Need a custom solution?
Powered by GitBook
On this page
  • Query Viewer
  • DAX
  • Cell Elements

Was this helpful?

  1. Power BI
  2. Power Query and DAX Formulas

Conditional Format using DAX

This goes step by step into setting up conditional formatting using new columns/measures in DAX

Query Viewer

Pull the distinct values you wish to conditional format

DISTINCT(SELECTCOLUMNS('Table','Column Name or Measure'))

DAX

Create a calculated column or measure using the SWITCH() formula. You can set it to background color, font clor, icons, and/or Web URL!

Column

Status Colors = 
VAR _s = 'Table'[Column]

RETURN
SWITCH(
	TRUE(),
	_s = "Closed","#ADADAD",
	_s = "Duplicate (closed)", "#777777",
	_s ="Open", "#E41A1C",
	_s = "Work In Progress", "#367DB7",
	_s = "Duplicate (open)", "#E41A1C",
	_s = "New", "#E41A1C"
)

Measure

Status Colors = 
VAR _s = [Measure]

RETURN
SWITCH(
	TRUE(),
	_s = "Closed","#ADADAD",
	_s = "Duplicate (closed)", "#777777",
	_s ="Open", "#E41A1C",
	_s = "Work In Progress", "#367DB7",
	_s = "Duplicate (open)", "#E41A1C",
	_s = "New", "#E41A1C"
)

Cell Elements

On tables and matrix visuals, you can set the field value to the value of a column or measure

PreviousCalculate Fiscal YearNextPercent Complete on Time

Last updated 8 months ago

Was this helpful?

Example conditional format