The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
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))
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!
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?
Hey @Phil_Seamark
Splendid! Thanks so much!
Any chance you might have an Idea about the colorcoding?
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,
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
73 | |
47 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
56 |