Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a column with dates in my dataset and another one (calculated column) that gives me the difference of days between today and the date of the first column mentioned.
I've tried to use the data group option in PBI, but today i have a list of values of difference of days and tommorow I will have another one. So, I wonder if there is any possibility to group by range of difference of days.
Can anyone help me out with the best solution?
Thanks
Solved! Go to Solution.
Hi @diogofma89 ,
Refer to the following test to see if it meets your needs.
Col_group =
VAR a = 'Table'[day_diff]
RETURN
IF ( a > 0 && a <= 90, "group1", IF ( a > 90 && a <= 180, "group2", "group3" ) )day_diff = DATEDIFF('Table'[Date],TODAY(),DAY)
If the problem is still not resolved, please indicate and provide a screenshot of the results you expect. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @diogofma89 ,
Refer to the following test to see if it meets your needs.
Col_group =
VAR a = 'Table'[day_diff]
RETURN
IF ( a > 0 && a <= 90, "group1", IF ( a > 90 && a <= 180, "group2", "group3" ) )day_diff = DATEDIFF('Table'[Date],TODAY(),DAY)
If the problem is still not resolved, please indicate and provide a screenshot of the results you expect. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@amitchandak , thanks for the reply, I just want to have a date slicer of one column and I would like to have a filter based on the difference of days between the date of that column and today, but instead of having a filter with numbers I would like to group the range of numbers with a specific text, like, from 1 to 90 "less than 3 months".
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |