Forum Discussion
Compare previous month data to current month
Can you share the measures you created that don't work in the gauge visualization? You should be able to put slice-able measures in all 4 spots (min, max, target, value) on that visualization, so it may be a fault in your measures.
I expect it is the way i am tring to use the visualization. I do not have a slicer on this particular page, I am creating/presenting this particular data for a group that wants a "one page" view showing if we are up for the month or down. I am able to get the gauge to show the current month data correctly, where i am hitting a wall is getting the target value to appear (last month total instrument count). In the picture I have "month" in the target value spot, but that will not work as I have no way to filter that specific value to count "2" or the previous month.
- dedelman_clng9 years ago
Community Champion
You will want to write a measure that gets the value you are showing (SERIAL NUMBER) but for the previous month.
Something like this:
PrevMonth = CALCULATE( COUNTA( Table[Serial Number] ), PARALLELPERIOD( Table[Date], -1, MONTH) )
- Saw_Dusted9 years agoNew Member
I tried this measure but receive an error when i put it into the target goal position. I changed the Table assignments to match my data (Table1[SERIAL_NUMBER]) for instance. I get the following error:
The Month value that i am working with is just a number representation (1 for January, 2 for February, etc) that I manually add to my spreadsheet. There is no unique key in my data that can identify when i exported it, that is why i manuall fill in. Should this be a full date format?
Thank you for your assistance.
- dedelman_clng9 years ago
Community Champion
Yes you should be using a Date type field to use PARALLELPERIOD. You could continue to use integers, but then you will want to add a year column in addition to the month column to account for what you want to show when it is January. That way is more complicated (lots of IF), so making the Month value be a Date that is the first day of the month is going to be your easiest path.
Hope this helps
David