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 Experts
I want a new measure which i cannot work out on how to calculate the
Percentage Difference
Jan 2020 (441) - Jan 2021 (685) week on week comparison
and so on for all the months - the sample PBIX file show a measure for month over month difference. Kinldy ignore that i managed to do that.
See sample PBIX file.
https://www.dropbox.com/s/g50upe7c0uxozlb/Mtnovermtn.pbix?dl=0
Solved! Go to Solution.
@Anonymous , Try like
total sales same week# previous month =
var _max = Max(DimDate[Date])
var _date = date(year(_max), month(_max)-12, Day(_max))
VAR currentyear = Year(_date)
VAR currentmonth = Month(_date)
VAR currentweeknumber = MAX(DimDate[weekinmonth])
RETURN
CALCULATE([total sales], FILTER( ALL(DimDate), DimDate[Year] = currentyear && DimDate[MonthNo] = currentmonth && DimDate[weekinmonth] = currentweeknumber))
Also be careful on sort order, as you might not have prior data for 1 year. I got confused and done some reordeing
@Anonymous , Try like
total sales same week# previous month =
var _max = Max(DimDate[Date])
var _date = date(year(_max), month(_max)-12, Day(_max))
VAR currentyear = Year(_date)
VAR currentmonth = Month(_date)
VAR currentweeknumber = MAX(DimDate[weekinmonth])
RETURN
CALCULATE([total sales], FILTER( ALL(DimDate), DimDate[Year] = currentyear && DimDate[MonthNo] = currentmonth && DimDate[weekinmonth] = currentweeknumber))
Also be careful on sort order, as you might not have prior data for 1 year. I got confused and done some reordeing
Thank you sir
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |