Forum Discussion
Need help-DAX code
- Anonymous1 year ago
Hi Pmrs,
Thanks for reaching out to the Microsoft fabric community forum.
I’ve replicated your scenario in Power BI and achieved the expected result using your logic:identifying agents who made more calls than their target.
I entered sample data with Agent, CallsMade, and TargetCalls columns.
To flag agents exceeding their targets, I added a calculated column:
ExceededFlag = IF('Table'[CallsMade] > 'Table'[TargetCalls], 1, 0)
This returns 1 if CallsMade is greater than TargetCalls.
Next, I created a measure to count the agents who exceeded their targets:
TotalExceededCalls = CALCULATE(COUNTROWS('Table'), 'Table'[CallsMade] > 'Table'[TargetCalls])
Using a table and a card visual in Power BI, I confirmed that 4 agents surpassed their targets, exactly as required.Please find the attached pbix file for your reference.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi Pmrs,
Thanks for reaching out to the Microsoft fabric community forum.
I’ve replicated your scenario in Power BI and achieved the expected result using your logic:identifying agents who made more calls than their target.
I entered sample data with Agent, CallsMade, and TargetCalls columns.
To flag agents exceeding their targets, I added a calculated column:
ExceededFlag = IF('Table'[CallsMade] > 'Table'[TargetCalls], 1, 0)
This returns 1 if CallsMade is greater than TargetCalls.
Next, I created a measure to count the agents who exceeded their targets:
TotalExceededCalls = CALCULATE(COUNTROWS('Table'), 'Table'[CallsMade] > 'Table'[TargetCalls])
Using a table and a card visual in Power BI, I confirmed that 4 agents surpassed their targets, exactly as required.
Please find the attached pbix file for your reference.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Best Regards,
Tejaswi.
Community Support
Hi Pmrs ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
- Anonymous1 year agoNot applicable
Hi Pmrs ,
I hope the information provided has been useful. Please let me know if you need further clarification
Thank you.
- Anonymous1 year agoNot applicable
Hi Pmrs ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.