cancel
Showing results for 
Search instead for 
Did you mean: 
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/...

 

 



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 25

Ted's Dev Camp - August 25, 2022

Watch Session 25 of Ted's Dev Camp.

Top Solution Authors