Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
Hoping someone can help! I'm trying to essentially create a KPI which compares this weeks total sum data to last week's total sum data.
MY data is essentially as below. So I would want the KPI to show that in week 1 total project hours was 25, In week 2 it was 30 which is a increase of +5. Then in Week 3 it increased by +5 again but this would only be displayed in week 3 etc.
your help is appreicated! I've been messing around with this measure but cant get it working:
Previous Week Project Hours = CALCULATE(SUM(WorkLog[HoursWorked]),WorkLog[Project Y/N] = "Y", CALENDAR(WorkLog[Start of Week] -7
Solved! Go to Solution.
Is that part of your table in the picture?
If so, you could:
Previous Week Project Hours =
VAR LastWeek =
MIN ( WorkLog[Week Num] ) - 1
RETURN
CALCULATE (
SUM ( WorkLog[Hours] )
)
-
CALCULATE
( SUM ( WorkLog[Hours] ),
WorkLog[Week Num] = LastWeek )
)
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Please try the DAX below.
Previous Week Project Hours = VAR LastWeek = MIN ( WorkLog[Week Num] ) - 1 RETURN CALCULATE ( SUM ( WorkLog[Hours] ), WorkLog[Week Num] = LastWeek ) )
If this is not what you want, please provide us more information about your report, so that we can make further analysis. You can upload a pbix file to Onedrive or any web storage and share the link. Do mask sensitive data before uploading.
Regards,
Charlie Liao
Is that part of your table in the picture?
If so, you could:
Previous Week Project Hours =
VAR LastWeek =
MIN ( WorkLog[Week Num] ) - 1
RETURN
CALCULATE (
SUM ( WorkLog[Hours] )
)
-
CALCULATE
( SUM ( WorkLog[Hours] ),
WorkLog[Week Num] = LastWeek )
)
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Thank you Steve! 🙂
Oooo! Thank you so much for that. So It looks like it pulled the data in but the data looks to be incorrect. The Goal should display 563.50 in this case and then work out the corresponding % increase/decrease if that makes sense.
Please try the DAX below.
Previous Week Project Hours = VAR LastWeek = MIN ( WorkLog[Week Num] ) - 1 RETURN CALCULATE ( SUM ( WorkLog[Hours] ), WorkLog[Week Num] = LastWeek ) )
If this is not what you want, please provide us more information about your report, so that we can make further analysis. You can upload a pbix file to Onedrive or any web storage and share the link. Do mask sensitive data before uploading.
Regards,
Charlie Liao
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |