Forum Discussion
DevonVanDam
Helper I
3 years agoCalculate DSO (Days Sales Outstanding) dynamically
Hi all, I am trying to create a dynamic DSO matrix table, but really struggeling. I have attached some dummy data which is in the same format. I also put in some results I am able to create in Ex...
- Anonymous3 years ago
Hi DevonVanDam ,
I created a sample pbix file(see the attachment), please check if that is what you want.
DSO = DATEDIFF('Table'[Invoice date],'Table'[Payment date],DAY)DSO Customer = VAR _custinv = CALCULATE ( SUM ( 'Table'[Invoice value] ), FILTER ( 'Table', 'Table'[Customer] = EARLIER ( 'Table'[Customer] ) ) ) RETURN DIVIDE ( 'Table'[DSO], _custinv ) * 'Table'[Invoice value]DSO Area = VAR _areainv = CALCULATE ( SUM ( 'Table'[Invoice value] ), FILTER ( 'Table', 'Table'[Sales area] = EARLIER ( 'Table'[Sales area] ) ) ) RETURN DIVIDE ( 'Table'[DSO], _areainv ) * 'Table'[Invoice value]DSO Company = VAR _companyinv = CALCULATE ( SUM ( 'Table'[Invoice value] ), FILTER ( 'Table', 'Table'[Company] = EARLIER ( 'Table'[Company] ) ) ) RETURN DIVIDE ( 'Table'[DSO], _companyinv ) * 'Table'[Invoice value]Best Regards
DevonVanDam
Helper I
3 years agoThe flex solution is:
DSO Measure =
SUMX(
DSO,
DSO[DSO] * DIVIDE(DSO[Invoice Value],
CALCULATE(SUM(DSO[Invoice Value]),
ALLSELECTED(DSO)))
)