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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Michalison
Helper II
Helper II

Help

I am creating a dashboard for absence reporting last week I had help from this community to create the following dax

 

rolling 6 months = CALCULATE(COUNT(Absence[Start Date]),DATESINPERIOD(Absence[Start Date],MAX(Absence[Start Date]),-6,MONTH))
 
This counts how many episdodes (not how many days) of absence someone has had over the last 6 months - I have now been asked by my employers can we have people who have had more than 3 episodes of absence in the last 6 months from todays date (ie system date) - I have no idea how to do this - any suggestions?  many thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Try this,

rolling 6 months = 

CALCULATE(COUNT(Absence[Start Date]),DATESINPERIOD(Absence[Start Date],today(),-6,MONTH))

 

and after on the filter panel you fix the value at >3 for this measure

View solution in original post

3 REPLIES 3
Michalison
Helper II
Helper II

Tried it just comes up with blank table

 

Michalison_0-1652962990826.png

 

Anonymous
Not applicable

Hi Try this,

rolling 6 months = 

CALCULATE(COUNT(Absence[Start Date]),DATESINPERIOD(Absence[Start Date],today(),-6,MONTH))

 

and after on the filter panel you fix the value at >3 for this measure

Thanks this works 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.