Forum Discussion
% Change over Month by customer
- Anonymous2 years ago
Hi Sut_Datanaut ,
I created a sample pbix file(see the attachment), please check if that is what you want.
% change of revenue = VAR _account = SELECTEDVALUE ( 'Table'[Account Name] ) VAR _part = CALCULATE ( SUM ( 'Table'[Revenue] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Account Name] = _account && 'Table'[Month Date] <= SELECTEDVALUE ( 'Table'[Month Date] ) ) ) VAR _all = CALCULATE ( SUM ( 'Table'[Revenue] ), ALLSELECTED ( 'Table' ) ) RETURN DIVIDE ( _part, _all )Best Regards
Sut_Datanaut , Join the date of your table with the date of the date table
and try measures like
Month behind Sales = CALCULATE(Count(Table[Account Name]),dateadd('Date'[Date],-1,month))
MTD = CALCULATE(Count(Table[Account Name]),DATESMTD('Date'[Date]))
last MTD = CALCULATE(Count(Table[Account Name]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
does it have to reference another date table? Or can I use the dates on the fact table.
Also, I want to get % change of revenue, not count of customers.
Thanks
- Anonymous2 years agoNot applicable
Hi Sut_Datanaut ,
I created a sample pbix file(see the attachment), please check if that is what you want.
% change of revenue = VAR _account = SELECTEDVALUE ( 'Table'[Account Name] ) VAR _part = CALCULATE ( SUM ( 'Table'[Revenue] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Account Name] = _account && 'Table'[Month Date] <= SELECTEDVALUE ( 'Table'[Month Date] ) ) ) VAR _all = CALCULATE ( SUM ( 'Table'[Revenue] ), ALLSELECTED ( 'Table' ) ) RETURN DIVIDE ( _part, _all )Best Regards