Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello Experts
I am trying to find the count of rows in a table for this month and last month based on a condition but I am getting incorect figures.
Calls this month:
Solved! Go to Solution.
Hi @Elisa112,
Please refer to the DAX calculations below for the current and previous month's call volume:
Current Month Calls:
Calls in Current month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
FILTER('Calls',
MONTH('Calls'[Call Date]) = MONTH(TODAY()) &&
YEAR('Calls'[Call Date]) = YEAR(TODAY()) &&
'Calls'[Outcome] = "appointed"
))
Previous Month Calls:
Calls in Previous month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
FILTER('Calls',
MONTH('Calls'[Call Date]) = MONTH(TODAY()) - 1 &&
YEAR('Calls'[Call Date]) = YEAR(TODAY()) &&
'Calls'[Outcome] = "appointed"
))
I believe this will achieve the desired outcome.
Thank you
Hi @Elisa112,
Please refer to the DAX calculations below for the current and previous month's call volume:
Current Month Calls:
Calls in Current month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
FILTER('Calls',
MONTH('Calls'[Call Date]) = MONTH(TODAY()) &&
YEAR('Calls'[Call Date]) = YEAR(TODAY()) &&
'Calls'[Outcome] = "appointed"
))
Previous Month Calls:
Calls in Previous month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
FILTER('Calls',
MONTH('Calls'[Call Date]) = MONTH(TODAY()) - 1 &&
YEAR('Calls'[Call Date]) = YEAR(TODAY()) &&
'Calls'[Outcome] = "appointed"
))
I believe this will achieve the desired outcome.
Thank you
thank you!
Hello
thank you but I am still getting incorrect figures, with the condition (appointed) I am getting the same figures without the condition.
any ideas?
thanks
Hi @Elisa112 -Can you please check the below logic.month(today()) will works.
Calls This Month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
FILTER(
'Calls',
MONTH('Calls'[Call Date]) = MONTH(TODAY()) &&
YEAR('Calls'[Call Date]) = YEAR(TODAY()) &&
'Calls'[Outcome] = "appointed"
)
)
Hope this helps.
Proud to be a Super User! | |
Hello
thank you but I am still getting incorrect figures, with the condition (appointed) I am getting the same figures without the condition.
any ideas?
thanks
Hi @Elisa112 -if possible, can you please share the working data pbix file by removing the sensitive data or sample data in excel copy for reference.
Calls This Month =
CALCULATE(
DISTINCTCOUNT('Calls'[Call ID]),
'Calls'[Outcome] = "appointed",
MONTH('Calls'[Call Date]) = MONTH(TODAY()),
YEAR('Calls'[Call Date]) = YEAR(TODAY())
)
Proud to be a Super User! | |
| User | Count |
|---|---|
| 55 | |
| 37 | |
| 23 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 39 | |
| 21 | |
| 21 |