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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.