Forum Discussion
Getting Date Difference between Stages in the same column
- 6 years ago
how it should look if no one slicer is chosen?
anyway, try a measure
Measure = var SecondStage = calculate(min('Table1'[Date]);ALLEXCEPT('Table1';'Table1'[Company];Table1[Stage])) var Init = calculate(max('Table1'[Stage]);ALLEXCEPT('Table1';'Table1'[Company]);'Table1'[Date]<SecondStage;'Table1'[Stage]<>"") var InitialStage = if(isblank(Init);SecondStage;calculate(min('Table1'[Date]);FILTER(ALL('Table1');'Table1'[Company]=SELECTEDVALUE(Table1[Company])&&'Table1'[Stage]=Init))) RETURN DATEDIFF(InitialStage; SecondStage; DAY)do not hesitate to give a kudo to useful posts and mark solutions as solution
One of the way is use SUMMARIZE and group data at the project level and then take a date diff
SUMMARIZE(Table,Table[Peoject],"Stage1",Minx(filter(table, stage ="sage1"),table[Date]),"stage2",Minx(filter(table, stage ="sage1"),table[Date]))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601