Forum Discussion
Count data between days
- 3 years ago
Hi vnqtrang
Assume you want to calculate the days between created date and today, you can add a new column similar to below column. Then add a table visual to the report, add Created and Snapshot ID columns to it and select Count aggregation on Snapshot ID.
Created = VAR _days = DATEDIFF('Table'[Created Date], TODAY(), DAY) RETURN SWITCH(TRUE(), _days<=5, "<5d", _days<=10, ">5d - 10d", _days<=30, ">10d - 30d", ">30d")Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. - 3 years ago
Hi vnqtrang
Enter a table with Index column. Then sort Created by Index. Sort one column by another column in Power BI - Power BI | Microsoft Docs
Create a relationship between tables on Created column. Then use SortTable's Created column in the table visual instead.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi vnqtrang
Assume you want to calculate the days between created date and today, you can add a new column similar to below column. Then add a table visual to the report, add Created and Snapshot ID columns to it and select Count aggregation on Snapshot ID.
Created =
VAR _days = DATEDIFF('Table'[Created Date], TODAY(), DAY)
RETURN
SWITCH(TRUE(),
_days<=5, "<5d",
_days<=10, ">5d - 10d",
_days<=30, ">10d - 30d",
">30d")
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Thank you it works as I wish.