Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi PBI Community,
I'm trying to build a dashboard where the user can input a date, and it will show them comparative metrics:
The Previous Day view has been giving me difficulty. I've structured my query as follows:
...but for some reason, 'PaidTotalYesterday' shows the same as the today value. This is especially confusing because I was able to get metrics for last year/quarter/month using a similarly structured query, however it is not working when I apply this to the day.
I am also able to get a working 'Yesterday' column via PREVIOUSDAY('Dates'[Day]) but cannot apply this to the 'PaidTotalYesterday' column.
Any help would be greatly appreciated!!!!
Some other info:
Solved! Go to Solution.
Hi @aganes
Based on my attached sample file,it seems correct.Could you share more details about your scenario?You may also try the second measure for your data.
PaidTotalYesterday2 = CALCULATE ( [PaidTotalDay], FILTER ( ALL ( Dates ), Dates[Date] = MAX ( Dates[Date] ) - 1 ) )
Regards,
Hi @aganes
Based on my attached sample file,it seems correct.Could you share more details about your scenario?You may also try the second measure for your data.
PaidTotalYesterday2 = CALCULATE ( [PaidTotalDay], FILTER ( ALL ( Dates ), Dates[Date] = MAX ( Dates[Date] ) - 1 ) )
Regards,
Thank you so much @v-cherch-msft! Your FILTER suggestion worked perfectly. Weird it didn't work with PREVIOUSDAY... that must have something to do with the way my calendar table is derived.
Much appreciated!
Alex