Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello all,
Hoping someone can help me. Currently I am creating an internal sales dashboard and one of the measures we use regularly is comparing week vs week i.e. current week vs prior week, current week vs same week last year and the year before.
I managed to solve nearly all the challenges by using "ISO Weeks" which I included in my calendar table but the final piece of the puzzle is that I would like to create the exact same visual as below but have it show Current Week ("CW") vs Prior Week ("PW") but I would like this automated so ideally thought there may be a way to use the calculate and selectedvalue functions to achieve this but can't quite wrap my head around it.
So if a use selects week 4 as below, the CW green bar will show the current week's sales but I would like the target line to show week 3.
Is there a way to put this into a DAX calculate measure somehow?
Some details of the tables I have in the file:
I also tried playing around with the below measure but couldn't really get it to work with my ISO Weeks so if this is the answer and you know how to adapt it, please let me know. I was trying to lookup the ISO week reference in my calendar table based on the CurrentDate table (which updates to todays date automatically everytime the file is opened).
Any and all help is appreciated. Thanks in advance.
Kind regards,
Solved! Go to Solution.
Perfect!
User | Count |
---|---|
15 | |
13 | |
12 | |
10 | |
10 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |