Forum Discussion
smithub
3 years agoHelper I
Calculate 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
1 year agoAdministrator
To 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.