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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I calculated working days with the below formula.
It is working perfectly fine. Now I want to calculate sales for same period last year based on these working days like if 1st working day of october 2022 is 3000 then what would be of 1st working day of October 2021. I was using sameperiodlastyear butit takes date instead if day. How can I use these working days as comparison, Your help would be highly appreciated.
Thank you
Solved! Go to Solution.
Hi @Junaid11 ,
You can try this method:
I create two tables as the sample data:
In the Invoice Data table, new some columns:
Sales = CALCULATE(SUM(Sales[Sales]), FILTER('Sales','Sales'[Date] = 'Invoice Date'[InvoiceDate]))Month = MONTH('Invoice Date'[InvoiceDate])Year = YEAR('Invoice Date'[InvoiceDate])LastYearWorkDaySales =
CALCULATE (
SUM ( 'Invoice Date'[Sales] ),
FILTER (
'Invoice Date',
'Invoice Date'[Month] = EARLIER ( 'Invoice Date'[Month] )
&& 'Invoice Date'[Year]
= EARLIER ( 'Invoice Date'[Year] ) - 1
&& 'Invoice Date'[Working Day Outcome Column]
= EARLIER ( 'Invoice Date'[Working Day Outcome Column] )
&& NOT ( ISBLANK ( 'Invoice Date'[Working Day Outcome Column] ) )
)
)
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Junaid11 ,
You can try this method:
I create two tables as the sample data:
In the Invoice Data table, new some columns:
Sales = CALCULATE(SUM(Sales[Sales]), FILTER('Sales','Sales'[Date] = 'Invoice Date'[InvoiceDate]))Month = MONTH('Invoice Date'[InvoiceDate])Year = YEAR('Invoice Date'[InvoiceDate])LastYearWorkDaySales =
CALCULATE (
SUM ( 'Invoice Date'[Sales] ),
FILTER (
'Invoice Date',
'Invoice Date'[Month] = EARLIER ( 'Invoice Date'[Month] )
&& 'Invoice Date'[Year]
= EARLIER ( 'Invoice Date'[Year] ) - 1
&& 'Invoice Date'[Working Day Outcome Column]
= EARLIER ( 'Invoice Date'[Working Day Outcome Column] )
&& NOT ( ISBLANK ( 'Invoice Date'[Working Day Outcome Column] ) )
)
)
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Junaid11 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |