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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
inawab
Frequent Visitor

Staff schedule Date in row

Hi Everyone,

 

I have staff schedule in monthly entry in excel, knowing the date is a row at the top; how can I use the below table to reflect it in power bi??

 

inawab_1-1656581406773.png

 

I have been trying for 2 weeks and I could not figerout how reflect it as:

NameShiftDate
TestA1-JULY-2022

 

Thank you

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @inawab ,

 

You can try to unpivot it in power query.

vchenwuzmsft_0-1657009327179.gif

Then create a custom column via:

#date(2022,7,Number.FromText([Attribute]))

 

vchenwuzmsft_1-1657009468358.png

Result:

vchenwuzmsft_2-1657009512592.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @inawab ,

 

You can try to unpivot it in power query.

vchenwuzmsft_0-1657009327179.gif

Then create a custom column via:

#date(2022,7,Number.FromText([Attribute]))

 

vchenwuzmsft_1-1657009468358.png

Result:

vchenwuzmsft_2-1657009512592.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

amitchandak
Super User
Super User

@inawab , Have date table with day as one column

 

Day = day([date])

 

Then create measure. I using max you use correct measure

 

M1= Max(Table[Col])

 

M2 = if (isblank(M1]), "Off", [M1])

 

 

Now display the same in matrix.

 

Use m2 to create a measure that returns color

 

Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)

 

 

Use this measure in conditional formatting using field value option

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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