Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi
I have a date column in my table which starts from Jan 1st 2021 to till date. The date column updates dynamically
I wanted to create a measure for number of days and visualize in the card. I will create date slicer, whenever move the dates in the slicer , the number of working date changes?
Is it possible in Power BI? Sorry I am new to Power BI
Solved! Go to Solution.
Hi @Sean500 ,
I created some data:
Here are the steps you can follow:
Create measure.
Measure =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
return
COUNTX(
FILTER(ALL('Table'),
NOT( WEEKDAY('Table'[Date]) ) in {6,7} && 'Table'[Date] >= _min &&'Table'[Date]<=_max),[Date])
Result:
If you still have holiday-related rest dates, you can express these rest dates in a table, and just add a function to Measure that does not belong to these dates.
Create measure:
Measure2 =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
var _column=SELECTCOLUMNS('Table2',"1",[Date])
return
COUNTX(
FILTER(ALL('Table'),
NOT( WEEKDAY('Table'[Date]) ) in {6,7} && 'Table'[Date] >= _min &&'Table'[Date]<=_max&& NOT('Table'[Date]) in _column ),[Date])
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Sean500 ,
I created some data:
Here are the steps you can follow:
Create measure.
Measure =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
return
COUNTX(
FILTER(ALL('Table'),
NOT( WEEKDAY('Table'[Date]) ) in {6,7} && 'Table'[Date] >= _min &&'Table'[Date]<=_max),[Date])
Result:
If you still have holiday-related rest dates, you can express these rest dates in a table, and just add a function to Measure that does not belong to these dates.
Create measure:
Measure2 =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
var _column=SELECTCOLUMNS('Table2',"1",[Date])
return
COUNTX(
FILTER(ALL('Table'),
NOT( WEEKDAY('Table'[Date]) ) in {6,7} && 'Table'[Date] >= _min &&'Table'[Date]<=_max&& NOT('Table'[Date]) in _column ),[Date])
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous
I consulted Perplexity and it had me change the bottom part of the measure and it is working now. Thanks again!
Hi @Sean500
Yes it is possible. Here is plenty of thread solution to your issue
And for the Holidays or your date columns that updates dynamicaly you will need to add Parameters
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |