Forum Discussion
Sut_Datanaut
Helper II
2 years ago% Change over Month by customer
Hey All, I have a table that essentially looks like below. I want to make a slicer for the app column that sees % change of all customers that roll up to that application. In order to do this, I...
- 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
Helper II
2 years agodoes 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
Anonymous
2 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