Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Dear The Community World, seems I can not solve my task without your help!
I have a table and I need to make grouping (firts by Project, then MAX Rev.Date, then MAX Rev.Number) and afterwards return the value from another coloumn.
More clear in the picture bellow:
I didn't find a similar task in our Forum.
Looking forward with your response!
BR Den
Solved! Go to Solution.
Hi @DenTOK
Try this:
Latest Code =
IF (
HASONEVALUE ( Projects[Project] ),
CALCULATE (
SELECTEDVALUE ( Projects[CODE] ),
GENERATE (
LASTDATE ( Projects[Revision Date] ),
LASTNONBLANK ( Projects[Revision Number], 0 )
)
)
)
The key part of the measure is GENERATE ( ... ), which finds the maximum Revision Date using LASTDATE (returning a 1x1 a table), and then finds the maximum Revision Number in the context of that date filter using LASTNONBLANK (also returning a 1x1 table). These become a combined filter, and the single value of CODE is returned with this filter applied.
The measure is also restricted to return blank unless a single Project is visible in the filter context.
Regards,
Owen
Hi @DenTOK
Try this:
Latest Code =
IF (
HASONEVALUE ( Projects[Project] ),
CALCULATE (
SELECTEDVALUE ( Projects[CODE] ),
GENERATE (
LASTDATE ( Projects[Revision Date] ),
LASTNONBLANK ( Projects[Revision Number], 0 )
)
)
)
The key part of the measure is GENERATE ( ... ), which finds the maximum Revision Date using LASTDATE (returning a 1x1 a table), and then finds the maximum Revision Number in the context of that date filter using LASTNONBLANK (also returning a 1x1 table). These become a combined filter, and the single value of CODE is returned with this filter applied.
The measure is also restricted to return blank unless a single Project is visible in the filter context.
Regards,
Owen
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |