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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Tomhayw
Helper I
Helper I

Selecting most recent data in a dataset

Hi there,

 

I currently have a dataset that updates regularly with an updated version of our CRM system as shown below:

Tomhayw_0-1661181591517.png

I have set up this measure:

Pipeline state (snapshot) = calculate(sum('Pipeline (Snapshots)'[Count of pipeline projects]), DateDim[Date] = max('Pipeline (Snapshots)'[Date Obersrved]))
 
This measure takes the most recent date and visualises it.
However, as you can see the 'Monitoring' group was present on 19/08, but was not present in 22/08, but is still visualised by the measure:
Tomhayw_1-1661181721674.png

Is it possible to modify my measure that would filter by the groups available on the newest date available?

 

Thanks in advance,

Tom

 

 
1 ACCEPTED SOLUTION

Hi there, that's what I did.

 

I found a solution to my problem:

 

MonthEnd = IF(CALCULATE(MAX('Pipeline (Snapshots)'[Date Observed]),FILTER('Pipeline (Snapshots)',MONTH('Pipeline (Snapshots)'[Date Observed])=MONTH(EARLIER('Pipeline (Snapshots)'[Date Observed]))))='Pipeline (Snapshots)'[Date Observed],1,0)
 
I added this as a calculate column - it marks each entry as a 1 or 0. A 1 indicates its the latest or the last entry in each month, hence I can use this as a filter!

View solution in original post

2 REPLIES 2
rsbin
Super User
Super User

@Tomhayw ,

Please give this a try:

Create a Measure:

MaxDate = MAX( 'Pipeline(Snapshots)'[Date Obersrved] )

This should evaluate to:  22 August 2022.

 

Then use this Measure in your measure above:

Pipeline state (snapshot) = calculate(sum('Pipeline (Snapshots)'[Count of pipeline projects]), DateDim[Date] = [MaxDate] )

This should then only capture the States that occur on 22 August.

 

Regards,

Hi there, that's what I did.

 

I found a solution to my problem:

 

MonthEnd = IF(CALCULATE(MAX('Pipeline (Snapshots)'[Date Observed]),FILTER('Pipeline (Snapshots)',MONTH('Pipeline (Snapshots)'[Date Observed])=MONTH(EARLIER('Pipeline (Snapshots)'[Date Observed]))))='Pipeline (Snapshots)'[Date Observed],1,0)
 
I added this as a calculate column - it marks each entry as a 1 or 0. A 1 indicates its the latest or the last entry in each month, hence I can use this as a filter!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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