Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi folks,
I have a bar graph which is comparing sales current year vs last year. For the future months of my current year, I don't want to show this information but the visual will still show as I have information from the previous year.
For example: In the graph below I want to show information only until August.
Does anyone know the better way to achieve this?
Good to hear that. Could you kindly mark as solution , as it works as per the scenario explained.
Thank you, Sarana..That's a great idea but I forgot to mention that I have had a slicer for years, so I'd need to treat it as well
I am current using SAMEPERIODLASTYEAR to calculate this
Current_year
Hi,Its simple, Follow the steps:
Write a measure m1 = var cur_Year = year(now())
var cur_month = Month(now()
var cur_day = day(now())
return
calculate(sum(sales),datesbetween(date(cur_Year-1,1,1),date(Cur_Year-1,cur_month,cur_day)))
Use this measure for last year sales, this will solve your scenario.
Note: Kindly mark as solution if it worked and give a thumpsup
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |