Forum Discussion
Need help-DAX code
- 1 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 ,
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.