March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I’m working with Power BI to analyze work package (WP) data over time. My dataset includes an initial bulk export of all WPs followed by daily exports that only include WPs with changes. Each record is tied to an Export_Date. I need to be able to:
Current DAX Formula ive used:
KPI - Total WP =
VAR SelectedExportDate =
MAX ( WP_Fact_Qry[Export_Date] ) -- Get the selected export date from the slicer
VAR LatestExportDatePerWP =
SUMMARIZE (
WP_Fact_Qry,
WP_Fact_Qry[WPNO_I],
-- Group by work package
"Latest Export Date",
CALCULATE (
MAX ( WP_Fact_Qry[Export_Date] ),
WP_Fact_Qry[Export_Date] >= SelectedExportDate -- Get the latest export date <= the selected date
)
)
RETURN
CALCULATE (
DISTINCTCOUNT ( WP_Fact_Qry[WPNO_I] ),
-- Count distinct work packages
TREATAS (
LatestExportDatePerWP,
WP_Fact_Qry[WPNO_I],
WP_Fact_Qry[Export_Date]
)
)
The formula works but ignores WPs that haven’t changed on the selected export date. If a WP wasn’t updated on or after the selected date, it’s not being shown, but I need to see the most recent record for every WP at any point in time based on the selected export date.
Any help or suggestions on how to retrieve the latest record for each WP, even if they haven’t changed, based on a Export_Date slicer would be greatly appreciated!
a brief summary of the Table in question:
contains a list of work packages (WPs), with each row representing the state of a work package at a given export date. The WPNO_I field, while representing the work package, is not unique, as a work package may have multiple rows if changes occur in future exports. The table tracks key fields related to the status, dates, and KPIs of each work package at the time of export.
Solved! Go to Solution.
well no solution has been provided however my workaround is to use the same formula and use a date filter with slider type "Below"
Hi @alasharimm,
I'm checking how the things are going on about this issue. Whether the answer helps you?
If there is any problem, please feel free to let us know.
well no solution has been provided however my workaround is to use the same formula and use a date filter with slider type "Below"
Hi @alasharimm
In the 12th line, I think your >= should be <= or the comment doesn't make sense.
WP_Fact_Qry[Export_Date] >= SelectedExportDate -- Get the latest export date <= the selected date
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |