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
PedroAzevedo
New Member

Having trouble creating dynamic goal

Hello! I'm having trouble with this specific issue, and it's not the first time I give up on having dynamic goals, because I can't get it to work, ever.

 

The current situation is as follows:

Partnr Table:

PARTNRNAME
PN1JOHN
PN2JAKE
PN3JONES


Accoun Table:

ACCOUNPARTNRCONSULTORSUPERVISOR
AC1PN1KATEMARK
AC2PN1KATEMARK
AC3PN1KATEMARK
AC4PN2SUZYMARK
AC5PN2SUZYMARK
AC6PN2SUZYMARK
AC7PN3LISACHRIS
AC8PN3LISACHRIS
AC9PN3LISACHRIS

 

Action Table:

ACTION_IDACCOUNDATE
1AC12025-01-01
2AC22025-01-01
3AC32025-01-03
4AC42025-01-03
5AC52025-01-05

 

Partnr - Accoun

PARTNR 1:* PARTNR

 

Accoun Action

ACCOUN 1:* ACCOUN

 

My goal:
I want to display a graph that shows two things for each day:

  1. The distinct count of PARTNR that received an action.
  2. The daily goal.

How the goal is calculated:
The goal should be 3 × the distinct count of CONSULTOR from the Accoun table for every weekday.

 

Why it needs to be dynamic:
If I select a specific SUPERVISOR in a slicer or visual, the goal should update to:
3 × the number of CONSULTOR assigned to that supervisor.

 

Additional requirement:
The graph should also show days where there were no actions, but still display the goal, so it’s clear when the goal wasn’t met.

 

Can someone guide me on the how to do this so I can finally be able to have goals on Power BI?

 

The intended output is:

Without any filters/slices applied, this should be the output (3 unique CONSULTOR times 3 = 9 for all days, actual is the distinct count of PARTNR for all ACCOUN that had at least one ACTION)

DATEGOALACTUAL
2025-01-0191
2025-01-0290
2025-01-0392
2025-01-0490
2025-01-0591

 

If we are filtering for SUPERVISOR 'MARK', he only has 2 CONSULTORES, so 2 * 3 = 6 as our GOAL:

DATEGOALACTUAL
2025-01-0161
2025-01-0260
2025-01-0362
2025-01-0460
2025-01-0561
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@PedroAzevedo here is what the measures looks like:

 

Goal = 
VAR __CountConusltor = DISTINCTCOUNT ( Accoun[CONSULTOR] )
RETURN
__CountConusltor * 3

Action = 
CALCULATE ( 
    DISTINCTCOUNT ( Accoun[PARTNR] ),
    CROSSFILTER ( 'Action'[ACCOUN], Accoun[ACCOUN], BOTH )
) 

 

2025-10-27_13-46-03.gif



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

10 REPLIES 10
parry2k
Super User
Super User

@PedroAzevedo In this case, I would recommend providing a little more example data to produce what you have shown. Maybe I missed something, the sample data was very limited hard to understand why it is not working.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I created a blank PBIX file and added some sample data to test your solution, and it works perfectly. The issue was caused by the relationship between the Calendar Date table and the Date field in the Action table being set to both directions, but the relationship line was hidden behind another table card in the Data Model (thanks to Power BI’s UI/UX).

 

Thank you so much for your patience and help!

parry2k
Super User
Super User

@PedroAzevedo I already shared the DAX, please test. Keep in mind I added a calendar table in the model and use that to visualize and  this is what I did to generate the calendar table and the relationship:

 

Calendar = 
VAR __StartDate = MIN ( 'Action'[DATE] )
VAR __EndDate = MAX ( 'Action'[DATE] )
RETURN 
CALENDAR ( __StartDate, __EndDate )

 

parry2k_0-1761598477547.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@PedroAzevedo here is what the measures looks like:

 

Goal = 
VAR __CountConusltor = DISTINCTCOUNT ( Accoun[CONSULTOR] )
RETURN
__CountConusltor * 3

Action = 
CALCULATE ( 
    DISTINCTCOUNT ( Accoun[PARTNR] ),
    CROSSFILTER ( 'Action'[ACCOUN], Accoun[ACCOUN], BOTH )
) 

 

2025-10-27_13-46-03.gif



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

PedroAzevedo_0-1761598489337.png

For some reason this is the output for my actual dataset when I selet 2 CONSULTOR from Accoun table, it only shows 6 as the goal for the days where both CONSULTOR had an ACTION.

parry2k
Super User
Super User

@PedroAzevedo when you have selected MARK why action count is 0 on 2025-01-05



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

It was a typo, AC5 belongs to MARK too, so it should be 1, I edited the previous message.

And yes, I'm trying to get the daily goal, but it should be the same goal for every day (except for weekends but I can add a IF in the end of the measure to deal with that).

parry2k
Super User
Super User

@PedroAzevedo, so you are trying to calculate the goal per day?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@PedroAzevedo You explained it very well, kudos to you. Now, can you provide some example output based on what you explained. It will help immensely to provide an effective solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Sure, should've provided it from the start!
Without any filters/slices applied, this should be the output (3 unique CONSULTOR times 3 = 9 for all days, actual is the distinct count of PARTNR for the ACCOUN that had one ACTION)

DATEGOALACTUAL
2025-01-0191
2025-01-0290
2025-01-0392
2025-01-0490
2025-01-0591

 

If we are filtering for SUPERVISOR 'MARK':

DATEGOALACTUAL
2025-01-0161
2025-01-0260
2025-01-0362
2025-01-0460
2025-01-0561

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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