Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
i write my code like below. I connect with my date table but when i use date table i am getting total value. It is not filtering the value. so i use dates between function and use the table's date column instead of my date table. now i am getting the right value but i have to change every month manually like next month i need to change "7/1/2022","7/31/2022". how can i write the below code, so i dont need to change dates every month?
Current_month_Candidate=IF(EMT[MG]="TC",(CALCULATE(COUNT(Candidate[JReq]), Candidate[Job level] in {"B","C","D"},DATESBETWEEN(Candiadte[Added Date],"6/1/2022","6/30/2022"))),
IF(EMT[MG]="LG",(CALCULATE(COUNT(Candidate[JReq]), Candidate[Job Family] in {"Analyst","Developer"},Candidate[Job level] in {"B","C","D"},DATESBETWEEN(Candiadte[Added Date],"6/1/2022","6/30/2022")))
I have tried below code also but i am not getting any value.
Current_month_Candidate=IF(EMT[MG]="TC",(CALCULATE(COUNT(Candidate[JReq]), Candidate[Job level] in {"B","C","D"},DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Thanks
Solved! Go to Solution.
Hi @mith_tina ,
Please have a try.
Create columns first.
Year_column=Year(Candiadte[Added Date])Month_column=Month(Candiadte[Added Date])
Then create a measure.
Current_month_Candidate =
IF (
MAX ( EMT[MG] ) = "TC",
(
CALCULATE (
COUNT ( Candidate[JReq] ),
FILTER (
ALL ( Candiadte ),
Candidate[JobLevel]
IN { "B", "C", "D" }
&& Candiadte[month_column] = SELECTEDVALUE ( Candiadte[month_column] )
&& Candiadte[Year_column] = SELECTEDVALUE ( Candiadte[Year_column] )
)
)
)
)
If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mith_tina ,
Please have a try.
Create columns first.
Year_column=Year(Candiadte[Added Date])Month_column=Month(Candiadte[Added Date])
Then create a measure.
Current_month_Candidate =
IF (
MAX ( EMT[MG] ) = "TC",
(
CALCULATE (
COUNT ( Candidate[JReq] ),
FILTER (
ALL ( Candiadte ),
Candidate[JobLevel]
IN { "B", "C", "D" }
&& Candiadte[month_column] = SELECTEDVALUE ( Candiadte[month_column] )
&& Candiadte[Year_column] = SELECTEDVALUE ( Candiadte[Year_column] )
)
)
)
)
If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mith_tina
You can try using below
THnaks Deevakar for your quick response. code is not working for me.,no value is showing. i am trying to show Month june's value.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 26 | |
| 23 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 35 | |
| 29 | |
| 21 | |
| 19 | |
| 17 |