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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
mmills2018
Helper IV
Helper IV

Snapshot Data

Hello,

 

I want to capture anyone who was coded to "Professional - P3", "Professional - P4" and "Professional - P5" at any time in 2021.  I currently have the below calculation , but its only capturing the last month of data (assuming its because of my LASTDATE), any ideas how i can capture this for all of 2021?

 

VAR LastDateSnap = LASTDATE('Snapshots'[Data As Of]) return IFERROR(TOTALYTD((CALCULATE(DISTINCTCOUNTNOBLANK('Job Changes'[Associate ID]), Snapshots[TalentPool]<> BLANK(),'Job Changes'[Promoted to M1 - M3]="Yes")), 'Job Changes'[Effective Date])/(CALCULATE(DISTINCTCOUNTNOBLANK('Snapshots'[AssociateID]),Snapshots[TalentPool]<>BLANK(),'Snapshots'[TerminationDate]=BLANK(),'Snapshots'[ManagementLevel]="Professional - P3" || 'Snapshots'[ManagementLevel]="Professional - P4" || 'Snapshots'[ManagementLevel]="Professional - P5",'Snapshots'[Data As Of]=LastDateSnap))+0,0)

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @mmills2018 ,

 

Has the problem been resolved? If not, please provide test data (delete sensitive information) I will answer you as soon as possible.


Best Regards,
Henry

 

v-henryk-mstf
Community Support
Community Support

Hi @mmills2018 ,

 

According to your description, it may be due to the wrong filtering context. Create a calendar table without establishing a relationship. The created parameter selects the date from the calendar table. The reference is as follows:

1 =
VAR a =
    SELECTEDVALUE ( 'Calendar'[Date] )
RETURN
    IFERROR (
        TOTALYTD (
            (
                CALCULATE (
                    DISTINCTCOUNTNOBLANK ( 'Job Changes'[Associate ID] ),
                    Snapshots[TalentPool] <> BLANK (),
                    'Job Changes'[Promoted to M1 - M3] = "Yes"
                )
            ),
            'Job Changes'[Effective Date]
        )
            / (
                CALCULATE (
                    DISTINCTCOUNTNOBLANK ( 'Snapshots'[AssociateID] ),
                    Snapshots[TalentPool] <> BLANK (),
                    'Snapshots'[TerminationDate] = BLANK (),
                    'Snapshots'[ManagementLevel] = "Professional - P3"
                        || 'Snapshots'[ManagementLevel] = "Professional - P4"
                        || 'Snapshots'[ManagementLevel] = "Professional - P5",
                    'Snapshots'[Data As Of] = a
                )
            ) + 0,
        0
    )

 

If the problem is still not resolved, can you provide a test data model (delete sensitive information), otherwise I cannot do further tests based on the formula.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

If you have a calendar table in your data model then you can modify the filter context to ignore all date filters except the fiscal year.

 

I recently stumbled onto a quirky alternative.  PARALLELPERIOD([date],0,Year) .  Yes, I already said quirky.  But it works.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.