Forum Discussion
smithub
Helper I
3 years agoCalculate days
Hi all, I would like to calculate the number of days each application is at each stage. From above image 'Earliest FirstDate' column shows the first date that the application went into...
Syndicate_Admin
Administrator
1 year agoTo solve this correctly in Power BI, create a new summary table with one row for each Customer_ID using this DAX formula:
CustomerDays = SUMMARIZE(Tabla, Tabla[Customer_ID], "Dias", DATEDIFF(MIN(Tabla[Date_start]), MAX(Tabla[Date_end]), DAY))
This will correctly calculate the days between the first and last date per customer. You can then do sums and averages on this new table (CustomerDays) in your visuals to get the correct values.