Forum Discussion
Last Week Total in If(IsBlank)
I am looking to add a Measure that will result in these same values for a week prior. Then with these results I am looking for a suggested visual that will show whether it is up or down from week over week.
- Anonymous2 years ago
Hi BrettM ,
According to the formula you provided, it should be calculating the total number of boxes shipped in the view ('vw_PBI_ShipmentsReturns') with a specific status of 'Ship'.
Last week's total shipments are referenced in the following formula:
TotalBoxesShippedWeekPrior = CALCULATE( [TotalBoxesShipped], DATEADD('Date'[Date], -7, DAY) )The week to week increase or decrease is referenced in the formula below:
UpDownWeekOverWeek = VAR CurrentWeek = [TotalBoxesShipped] VAR WeekPrior = [TotalBoxesShippedWeekPrior] RETURN IF ( ISBLANK ( CurrentWeek ) || ISBLANK ( WeekPrior ), BLANK (), IF ( CurrentWeek > WeekPrior, "Up", "Down" ) )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
2 Replies
- AnonymousNot applicable
Hi BrettM ,
According to the formula you provided, it should be calculating the total number of boxes shipped in the view ('vw_PBI_ShipmentsReturns') with a specific status of 'Ship'.
Last week's total shipments are referenced in the following formula:
TotalBoxesShippedWeekPrior = CALCULATE( [TotalBoxesShipped], DATEADD('Date'[Date], -7, DAY) )The week to week increase or decrease is referenced in the formula below:
UpDownWeekOverWeek = VAR CurrentWeek = [TotalBoxesShipped] VAR WeekPrior = [TotalBoxesShippedWeekPrior] RETURN IF ( ISBLANK ( CurrentWeek ) || ISBLANK ( WeekPrior ), BLANK (), IF ( CurrentWeek > WeekPrior, "Up", "Down" ) )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Ritaf1983
Super User
Hi BrettM
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523