Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hey peeps,
I am trying to create a measure which will count the number of invoices which have been processed per month.
I then want to be able to filter this with a slicer based on the selected range of days.
My table is called 'Invoices' and the count should be on the column called 'Invoice'.
Thanks!
Solved! Go to Solution.
Hi, @LowriDragon
Thanks for the reply from danextian. Perhaps you can try to create multiple Numeric parameters to achieve your needs.
Counts =
VAR _year = SELECTEDVALUE('Year'[Year])
VAR _month = SELECTEDVALUE('Month'[Month])
VAR _startDay = SELECTEDVALUE('Day Range Start'[Day Range Start])
VAR _endDay = SELECTEDVALUE('Day range end'[Day range end])
VAR _startDate = DATE(_year,_month,_startDay)
VAR _endDate = DATE(_year,_month,_endDay)
VAR _re = CALCULATE(COUNTROWS(Invoices),FILTER(Invoices,Invoices[process ?] = "Yes" && Invoices[date]>=_startDate && Invoices[date]<=_endDate))
RETURN
IF(ISBLANK('Year'[Year Value]) || ISBLANK('Month'[Month Value]) || ISBLANK('Day Range Start'[Day Range Start Value]) || ISBLANK('Day Range Start'[Day Range Start Value]),"Error Date Range",_re
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @LowriDragon
Thanks for the reply from danextian. Perhaps you can try to create multiple Numeric parameters to achieve your needs.
Counts =
VAR _year = SELECTEDVALUE('Year'[Year])
VAR _month = SELECTEDVALUE('Month'[Month])
VAR _startDay = SELECTEDVALUE('Day Range Start'[Day Range Start])
VAR _endDay = SELECTEDVALUE('Day range end'[Day range end])
VAR _startDate = DATE(_year,_month,_startDay)
VAR _endDate = DATE(_year,_month,_endDay)
VAR _re = CALCULATE(COUNTROWS(Invoices),FILTER(Invoices,Invoices[process ?] = "Yes" && Invoices[date]>=_startDate && Invoices[date]<=_endDate))
RETURN
IF(ISBLANK('Year'[Year Value]) || ISBLANK('Month'[Month Value]) || ISBLANK('Day Range Start'[Day Range Start Value]) || ISBLANK('Day Range Start'[Day Range Start Value]),"Error Date Range",_re
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @LowriDragon
What is the logic to count the invoices by day when your data shows by month?
I want to be able to count the number of invoices processed per month, within the first 10 days, or the first 15 days. This is for comparison purposes.
This is just a sample measures based on the data provided:
15 days =
CALCULATE (
[invoice count],
FILTER ( VALUES ( dates[date] ), DAY ( dates[date] ) <= 15 )
)
If this isn't what you're looking for, please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
I am looking for this to be dynamic with a slicer for selecting the day range. The day range is based on the day numbers in the date table.
Going back to this:
Please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind.
I have explained my reasoning, not that I should need to justify what I am trying to do.
If you can't help, that's ok.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.