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.
I have a long list with multiple entries per month. I want to know how to write a formula that would show the percentage change per month of the Impressions column.
Thank you in advance.
Solved! Go to Solution.
Hi @DouglasWatkins ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _startdate=
DATE(YEAR(MAX('Table'[Date])),MONTH(MAX('Table'[Date])),1)
var _enddate=
EOMONTH(_startdate,0)
var _laststartdate=
DATE(YEAR(MAX('Table'[Date])),MONTH(MAX('Table'[Date]))-1,1)
var _lastenddate=
EOMONTH(_laststartdate,0)
var _thissum=
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_startdate&&'Table'[Date]<=_enddate),[Impressions])
var _lastsum=
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_laststartdate&&'Table'[Date]<=_lastenddate),[Impressions])
return
DIVIDE( _thissum - _lastsum,_thissum)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @DouglasWatkins ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _startdate=
DATE(YEAR(MAX('Table'[Date])),MONTH(MAX('Table'[Date])),1)
var _enddate=
EOMONTH(_startdate,0)
var _laststartdate=
DATE(YEAR(MAX('Table'[Date])),MONTH(MAX('Table'[Date]))-1,1)
var _lastenddate=
EOMONTH(_laststartdate,0)
var _thissum=
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_startdate&&'Table'[Date]<=_enddate),[Impressions])
var _lastsum=
SUMX(FILTER(ALL('Table'),'Table'[Date]>=_laststartdate&&'Table'[Date]<=_lastenddate),[Impressions])
return
DIVIDE( _thissum - _lastsum,_thissum)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
seems you are expecting a measure. But measures depend on context, how would you like to present your data? A table visual? What field will you pull to the axis? you would depict it with excel table.
I will show it in a bar or line chart. I probably need to create a column that sums the Impressions by month. Then I would like to use that column to create a column or measure which I can use with a connected date table to create a bar/line chart.
indeed there are multiple ways, it would be super easier if you have a Date table.
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |