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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SACooper
Helper II
Helper II

Conditional Formatting Matrix with date Heirarchy.

I have a matrix with a date heirarchy (Date, Week Commencing, Month and Year) in columns and then Manager and Employee's in rows, I also have a count of completed work items as values. So by drilling up and down or expanding/collpasing a manager we can easily see number of work items completed per employee/Manager/everyone per day/week/month/year -- so far so good.

 

There is a target of 43 items per day per employee - what I'd like to do is conditionally format the work item count so that if we're looking at dates its against a target of 43 items per day per employee, if its per week its 43 x 5 per employee and so on, and if we're looking at managers its 43 items per employee per day etc.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SACooper , You can create a measure like

 

Switch(True(),

isinscope(Date[Date]) , 43 ,

isinscope(Date[week]) , 43*5 ,

isinscope(Date[month]) , 43*22

)

 

or

 

Sumx(employee,calculate(

Switch(True(),

isinscope(Date[Date]) , 43 ,

isinscope(Date[week]) , 43*5 ,

isinscope(Date[month]) , 43*22

)) )

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
SACooper
Helper II
Helper II

... don't know why I hadn't thought of this as I use something similar elsewhere ... thank you so much!

amitchandak
Super User
Super User

@SACooper , You can create a measure like

 

Switch(True(),

isinscope(Date[Date]) , 43 ,

isinscope(Date[week]) , 43*5 ,

isinscope(Date[month]) , 43*22

)

 

or

 

Sumx(employee,calculate(

Switch(True(),

isinscope(Date[Date]) , 43 ,

isinscope(Date[week]) , 43*5 ,

isinscope(Date[month]) , 43*22

)) )

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors