Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello, I have large datasets for my pipeline and I want to compare the value of specific ID 6 months ago based on Date slicer where I filter the date, i.e. if I pick 1 Sep 23 in the date slicer, I want my dax to return the value 6 months ago based on my "Date" column in the dataset (1 Mar 23).
The problem is that I don't have daily data, so I need the dax measure to provide me with the value of the closest next available date, which could be 3 March 2023, or 4 Mar 2023, etc.
I currently have this measure:
CALCULATE([OpenPipeline],PARALLELPERIOD('Rolling Calendar'[date],-6,MONTH))
Any ideas on how to tweak it? Appreciate any suggestions!!
Notes on data infrastrucutre: I have a calendar table linked to all my tables via "Date" column
Example of dates
Solved! Go to Solution.
Hi @Marianna
You can refer to the following solution.
Sample data
Date table
e.g
Measure = var a=CALCULATE(MAX('Table'[Column1]),DATEADD('Table 2'[Date],-6,MONTH))
var _date=CALCULATE(MIN('Table'[Date]),'Table'[Date]>(EOMONTH(SELECTEDVALUE('Table 2'[Date]),-7)+DAY(SELECTEDVALUE('Table 2'[Date]))),CROSSFILTER('Table 2'[Date],'Table'[Date],None))
return IF(a=BLANK(),CALCULATE(MINX(FILTER('Table',[Date]=_date),[Column1]),CROSSFILTER('Table'[Date],'Table 2'[Date],None)),a)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Marianna
You can refer to the following solution.
Sample data
Date table
e.g
Measure = var a=CALCULATE(MAX('Table'[Column1]),DATEADD('Table 2'[Date],-6,MONTH))
var _date=CALCULATE(MIN('Table'[Date]),'Table'[Date]>(EOMONTH(SELECTEDVALUE('Table 2'[Date]),-7)+DAY(SELECTEDVALUE('Table 2'[Date]))),CROSSFILTER('Table 2'[Date],'Table'[Date],None))
return IF(a=BLANK(),CALCULATE(MINX(FILTER('Table',[Date]=_date),[Column1]),CROSSFILTER('Table'[Date],'Table 2'[Date],None)),a)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Marianna
Adapt your your measure to
CALCULATE([OpenPipeline],DATEADD('Rolling Calendar'[date],-6,MONTH))
PARALLELPERIOD will get the value for the whole month whereas DATEADD is date specific. Add the Date from the Date table in the slicer as this will show all dates. If you scroll to March 3rd then you will see data from Sept 3rd
Thanks
Joe
If this post helps, then please Accept it as the solution
Hi @JoeBarry thank you for the suggestion!!! But what if I do not have data on March 3rd?
If I select September 3rd, and I do not have data for March 3rd date (backwards 6 months), I need to see the next date that I have, which might be March 5
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
85 | |
49 | |
38 | |
28 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
45 |