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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
NikolaiM
New Member

Sort out preset time periods

Hi, I have an issue trying to set up a slicer for preset time periods like "Last 24 hours", "Last 48 hours" and "Last 1 week".

When pressing the diffrent time periods I want all of the data to show for that period. But since I'm using a calculated column that converts the date/time column to "24h", "48h" and "1w", it only show the 48-24 when pressing "48h". How can I make it so all data is included? 

NikolaiM_1-1728546767873.pngNikolaiM_0-1728546742799.png

NikolaiM_2-1728546948567.png

 

All help and tips are appreciated 🙂

 

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

I am not sure I follow, but anyway I recommend creating this kind of time intelligence options using calculation groups. So either user Tabular editor or do the following:

1. Go to Modelling view and select calculation groups:

ValtteriN_0-1728555358613.png

2. Press the ... and create a new calculation group:

ValtteriN_1-1728555380393.png


e.g. 24h: 

24h = CALCULATE(SELECTEDMEASURE(),ALL('Calendar'),'Calendar'[Date]>= NOW()-1)

ValtteriN_2-1728555463993.png

 

Example data and usage:
ValtteriN_3-1728555538809.png

 

ValtteriN_4-1728555591714.png

 

Measure 31 = SUM('Table (42)'[Data])

ValtteriN_5-1728555755724.png

 

When applying the calculation group only the row which is within 24h is shown.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

I am not sure I follow, but anyway I recommend creating this kind of time intelligence options using calculation groups. So either user Tabular editor or do the following:

1. Go to Modelling view and select calculation groups:

ValtteriN_0-1728555358613.png

2. Press the ... and create a new calculation group:

ValtteriN_1-1728555380393.png


e.g. 24h: 

24h = CALCULATE(SELECTEDMEASURE(),ALL('Calendar'),'Calendar'[Date]>= NOW()-1)

ValtteriN_2-1728555463993.png

 

Example data and usage:
ValtteriN_3-1728555538809.png

 

ValtteriN_4-1728555591714.png

 

Measure 31 = SUM('Table (42)'[Data])

ValtteriN_5-1728555755724.png

 

When applying the calculation group only the row which is within 24h is shown.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.