Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have a table that have various coumns including "Start Date". I am trying to create a measure that will display the number of rows with the "Start Date" as the previous month. So as an example if we are in Feb 22, I want to display the number of rows that have the start date in Jan 22.
I have tried various other solutions found on the web, but cant get any to work.
Thanks in advance
Solved! Go to Solution.
@StuartSmith If that code works then you can update the code like below just to avoid that filter.
Measure = CALCULATE(COUNTROWS('HR Data'), All('Dates'),PREVIOUSMONTH('Dates'[Date]))
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
OK, Figured out that there is a page fiilter that is preventing the value from being displayed, although unsure why this page filter would prevent the mesaure from counting/displaying the rows dated for the previous month (Jan) as the page filter is only to show anticipated start dates on or after 01/011/22 and on or before 31/12/22 to is within range.
Can anyone assist?
@StuartSmith If that code works then you can update the code like below just to avoid that filter.
Measure = CALCULATE(COUNTROWS('HR Data'), All('Dates'),PREVIOUSMONTH('Dates'[Date]))
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I just figured that by adding "All" it will remove the filters, and show a value, but its the incorrect value. Now that i know the casue (filter), I should be able (hopefully) to get a workaround.
Hi, I tried your solution referrencing the "Date" table which I already had created and that displayed "(Blank)".
Hi @StuartSmith ,
Please try:-
Measure = CALCULATE(countrow(table), PREVIOUSMONTH('Datetable'[date]))
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
78 | |
41 | |
40 | |
35 |