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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jaylyn
Frequent Visitor

Previous full 6 months excluding current month calculation behaving odd with date slicer

I am trying to get the average networkdays between the process hire date and created date. 

I need this average for the last 3 and last 6 completed months, since we are in may, the months will be from april-feb(3 completed months) and april -november 2023 (6 completed months). 

 

****RELATIONSHIP: my date table is disconnected from the ejh created date table ****

 

my variables provide the right dates when tested. when i put the measures on the table and try to splice it by the date in the datetable OR the date in the ejh created date table (table where the columns live), it has a weird behavior:

1. the 6 months is not slicing at all when i add the dates from datetable on it 

2. the 6 months is not slicing correctly when i put the ejh created date on it 

3. i'm getting more than 6 months 

4. the 3 months slice correctly when i put the ejh created date on it but not when i put the date from datetable on it 

5. the VAR maxdate using the datetable doesn't make a difference if i use the ejh created date- behavior persists 

 

Overall: the single VALUE when it is not sliced by any date, appears to be correct

THANK YOU!!

 

 

values expected to be counted.JPG

 

 

 

 

 

var verification.JPGlast6fullmonthsresults.JPG3fullmonths.JPG

 

 

 

1 REPLY 1
Greg_Deckler
Super User
Super User

@jaylyn You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

If that doesn't help, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.