Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
any help here will be most appreciated!!
I'm trying to create a measure that will count records older than the previous month..
So if today anything older than the 1st of March (feb and back) I can do this in a card with filters quite easily, by setting a date, something I then have to alter at the start of each month to keep the number correct...
However I don't want to do that and I also need the measure to help create a percentage figure.
I've tried.....
older than previous month = CALCULATE(DISTINCTCOUNT(AllJobView[JTJobNo]), < PREVIOUSMONTH('AllJobView'[jtpromisedate]))
but it doesnt like the "<"
When I remove it, I get an error saying that the specified column is not a date type (this is probably a totally seperate issue... It is a date field)
but no luck
i'm basically trying to count jobs that are feb and older, then next month march and older etc.... but want to do this without manual filter setting each month.
cheers
Solved! Go to Solution.
Hi there,
You can get away without creating a Date table but you might want to consider adding one later on.
Here are a couple of options just using your AllJobView table:
older than previous month = CALCULATE ( DISTINCTCOUNT ( AllJobView[JTJobNo] ), AllJobView[jtpromisedate] <= EOMONTH ( TODAY (), -2 ) )
Count before previous month = CALCULATE ( DISTINCTCOUNT ( AllJobView[JTJobNo] ), DATESBETWEEN ( AllJobView[jtpromisedate], BLANK(), EOMONTH( TODAY(), -2 ) ) )
Regards,
Owen
Hi there,
You can get away without creating a Date table but you might want to consider adding one later on.
Here are a couple of options just using your AllJobView table:
older than previous month = CALCULATE ( DISTINCTCOUNT ( AllJobView[JTJobNo] ), AllJobView[jtpromisedate] <= EOMONTH ( TODAY (), -2 ) )
Count before previous month = CALCULATE ( DISTINCTCOUNT ( AllJobView[JTJobNo] ), DATESBETWEEN ( AllJobView[jtpromisedate], BLANK(), EOMONTH( TODAY(), -2 ) ) )
Regards,
Owen
Top Man!!
This simple looking fix is going to help me across a number of my reports! Cheers
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |