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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

I need a measure to account for different date ranges

I have the attached formula that I'm using to calculate the number of rows against a goal.  I'm using the Contacts Made Counter is if statements that produce a 1 for each row that meets the criteria.  These are surveys so each row has a date.   So I'm summing the number of contacts made, and want to divide that by a goal for a percentage, in this case 7.   
 
CFTSS Quarterly % to Goal = DIVIDE(SUM('Community Programs Quarterly Survey Data'[Contact Made Counter]),7)
 
My problem is that the goal changes and has changed.  So i would like to be able to say the goal was 6 between some start date, and some end date, and is now 7 from some date going forward, until it changes again then I can update the formula.
 
Can anyone help me?
5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a 'What If' parameter.

v-lionel-msft_0-1602492148276.png

v-lionel-msft_2-1602492164252.png

Please refer to my .pbix file.

 

Best regards,
Lionel Chen

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

 

Anonymous
Not applicable

Hi Lionel,

 

That would work, however, i'm hoping to ulimately be able to graph over time the % achievement rate relative to goal.  So i'm hoping to be able to let a single measure account for the changing goal over time?  Got any ideas how to do that?

Hi @Anonymous ,

 

Or this?

 

Measure = 
DIVIDE(
    SUM('Table'[Contact Made Counter] ), 
    CALCULATE(
        COUNTROWS( 'Table' ),
        FILTER(
            ALL('Table'),
            'Table'[Column] = "Yes"
        )
    )
)

 

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

@Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Here's the output in table form.  I can't figure out how to insert files so i'm just screen shotting the data as it comes in from excel csv.

 

tkeelan2_0-1602176944208.png

tkeelan2_1-1602177076314.png

 

 

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors