Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I'm trying to determine why my date measure used to filter a table is not working.
I have created a measure called PriorMonthStart. Its value is calculated and is shown as 07/01/2021. All set... looks good.
Then I am counting the number of rows for a date equal to greater than the PriorMonthStart in this dataset:
Solved! Go to Solution.
Hi @SSBTexas ,
Not sure what is [DataThurMonth],is it a measure?Is it a fixed value?Will it cause a context problem?
Here I made a simple sample according to your data and using value of "today()" instead:
PriorMonthStart = DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
MonHiresCount = CALCULATE(
COUNTROWS('Table'),
FILTER(ALL('Table'), 'Table'[Hire_Date] >= [PriorMonthStart]))
And you will see:
Check my sample .pbix file attached for reference.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi @SSBTexas ,
Not sure what is [DataThurMonth],is it a measure?Is it a fixed value?Will it cause a context problem?
Here I made a simple sample according to your data and using value of "today()" instead:
PriorMonthStart = DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
MonHiresCount = CALCULATE(
COUNTROWS('Table'),
FILTER(ALL('Table'), 'Table'[Hire_Date] >= [PriorMonthStart]))
And you will see:
Check my sample .pbix file attached for reference.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
@SSBTexas The issue is likely related to your PriorMonthStart and is also likely a context issue. It's hard to really know though without sample data, etc. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |