Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a situation I would love help with. Below is an example of my data on a small scale Basically what I am looking for is to zero in on the last work day of the week so I can look at productivity. I want to be able to slice the data by location, week, so on. We all know there is a decline in the productivity for that last day of the week, but I want to uantify it and visualize it across multiple slicers. My idea was to create a column that would help me identify the gap in dates greater than 1, but not sure. Any idea how?
Week | Day | Location | Employee | Production |
1 | 1/2 | Detroit | John | 452 |
1 | 1/3 | Detroit | John | 400 |
1 | 1/4 | Detroit | John | 420 |
1 | 1/5 | Detroit | John | 250 |
2 | 1/9 | Detroit | John | 450 |
2 | 1/10 | Detroit | John | 420 |
2 | 1/11 | Detroit | John | 450 |
2 | 1/12 | Detroit | John | 262 |
@Anonymous
What do you really want to calculate? Do you want to calculate Production on the last day (existing in the table) of the week when you slice by Week or do you want to identify the gaps in the Day column, meaning you want to have a calculated column? It's not really clear what you want...
Hi, @Anonymous
Please correct me if I wrongly understood your quetion.
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
Productions Diff VS Last Day =
VAR currentweek =
MAX ( Production[Week] )
VAR currentlocation =
MAX ( Production[Location] )
VAR currentemployee =
MAX ( Production[Employee] )
VAR currentday =
MAX ( Production[Day] )
VAR lastdayproduction =
CALCULATE (
LASTNONBLANKVALUE ( Production[Day], Production[Productions] ),
FILTER (
ALLSELECTED ( Production ),
Production[Day] < currentday
&& Production[Week] = currentweek
&& Production[Location] = currentlocation
&& Production[Employee] = currentemployee
)
)
RETURN
IF (
NOT ISBLANK ( lastdayproduction ),
IF (
ISFILTERED ( Production[Week] ),
Production[Productions] - lastdayproduction
)
)
https://www.dropbox.com/s/aw2x8c5nitnzdt0/timmay.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |