- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Graph the current Month (day-to-day) with previous Month
Hey there,
First of thanks to the community for their help already. You guys have been awesome!
Now, I am hoping for a solution in a problem that I have just encountered with trying to compare different data over time. I know this has been looked at various times but I was not able to find a fitting solution so far.
1) What I am trying to achieve, is to show Data for the current Month, as well as Data for the previous Month up to the specific date (e.g. January 1 - 26; February 1 - 26 (current month) ). I am using the chicletslicer to slice by Month as shown in the Screenshot. Now, it it possible that todays date is automatically drawn even though i have selected the whole month?
2) Despite getting this up and running what I am also trying to achieve is to have the two values January/Feburary (current month) put into the graph to show the different values ofer a period of the month in a day-to-day view (screenshot). Also, the Values themselve (e.g. 77 & 51 (sum of values for January), are not changing if I choose a bar on the graph.
I am calculating the previous months values with:
Visitors previous month = CALCULATE(SUM('Table'[Visitors]); PREVIOUSMONTH(Datedimension[Date]))
However i am not able to show it on a day-to-day graph which does have to do with the PREVIOSMONTH, but I am not sure what to use here. I have tried to create a Table with:
same period last month = CALCULATE(SUM('GA_Master 1'[Besucher]);DATEADD('GA_Master 1'[Date];-1;MONTH))
But this is not giving me back any values at all.
3) I am trying to show the changes in percentage in color (e.g. Red: Negative, Black: Neutral, Green: Positive). Any suggestions?
Thank you guys in advance for any help!
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For 1) how does this measure look?
I think it should return the value for the same Day of the month for the previous month.
Visitors Last Month = var Offset = DAY(EOMONTH(LASTDATE('Table'[Date]),-1)) RETURN =CALCULATE(SUM('Table'[Visitors]),DATEADD('Table'[Date],-Offset,DAY))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Phil_Seamark,
Thanks a lot. Cut out the '"=" between RETURN and CALCULATE and it is working perfectly! Is there any chance you could give me a quick rundown on the formular and what is actually beeing calculated and how?
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Keha
Good spotting about the =
I'm sure there are a few approaches but what this does is work out how many days there were in total for the previous month.
So if the date of your current row is the 15th of February, it counts the number of days in January (31) and subtracts this number in days from the 15th of Feb. You can't subtract a hardcoded because you'll end up on a different day.
Does that help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Phil_Seamark
Splendid! Thanks so much!
Any chance you might have an Idea about the colorcoding?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In a chart, the color of bar is based on the legend and category on X axis. It's not based on the Value. And you have to set it manually. There's no conditional formatting in chart visuals.
Regards,

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-08-2024 11:41 PM | |||
09-13-2024 01:25 PM | |||
05-16-2024 07:31 AM | |||
09-06-2024 06:18 AM | |||
07-10-2024 03:57 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |