Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
diogofma89
New Member

group values difference dates range

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 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

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)

 

vhenrykmstf_0-1653556526512.png

vhenrykmstf_1-1653556660134.png

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.

View solution in original post

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

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)

 

vhenrykmstf_0-1653556526512.png

vhenrykmstf_1-1653556660134.png

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 @v-henryk-mstf , thank you so much, it worked perfectly! 

Best regards

diogofma89
New Member

@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".

amitchandak
Super User
Super User

@diogofma89 , Can two date/period slicer can help

 

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.