Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, @jesly_ajin
I am not quite sure if the below measure suits your requirement because it was quite difficult for me to understand your data model.
Please try to test it on the blank page.
On the blank page, create a slicer that uses a calendar-table, that is disconnected to the table.
weekdayscount(new) =
VAR newtable =
ADDCOLUMNS (
InEightProjEquipmentStagingTable,
"@dayscount",
CALCULATE (
COUNTROWS ( 'calendar' ),
DATESBETWEEN (
'calendar'[Calendar_date],
SELECTEDVALUE ( InEightProjEquipmentStagingTable[FROMDATE] ),
SELECTEDVALUE ( InEightProjEquipmentStagingTable[TODATE] )
),
'calendar'[Week_day_name] <> "Saturday"
&& 'calendar'[Week_day_name] <> "Sunday"
)
)
RETURN
SUMX ( newtable, [@dayscount] )
If the above is not working, please try to change the [FROMDATE] and [TODATE] columns to Date Type, not date & time type.
I hope it works.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Hi, @jesly_ajin
I am not sure about how your data model look like, but in my cases, I generally have custom date table, and I normally write below DAX measure.
I have DayOfWeek column in my date-table. (Sunday = 0, Saturday = 6)
Thanks for response.
I have 2 measures [CalcFromDate] & [CalcToDate] :-
Hi, @jesly_ajin
I am not quite sure if the below measure suits your requirement because it was quite difficult for me to understand your data model.
Please try to test it on the blank page.
On the blank page, create a slicer that uses a calendar-table, that is disconnected to the table.
weekdayscount(new) =
VAR newtable =
ADDCOLUMNS (
InEightProjEquipmentStagingTable,
"@dayscount",
CALCULATE (
COUNTROWS ( 'calendar' ),
DATESBETWEEN (
'calendar'[Calendar_date],
SELECTEDVALUE ( InEightProjEquipmentStagingTable[FROMDATE] ),
SELECTEDVALUE ( InEightProjEquipmentStagingTable[TODATE] )
),
'calendar'[Week_day_name] <> "Saturday"
&& 'calendar'[Week_day_name] <> "Sunday"
)
)
RETURN
SUMX ( newtable, [@dayscount] )
If the above is not working, please try to change the [FROMDATE] and [TODATE] columns to Date Type, not date & time type.
I hope it works.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Hi, @jesly_ajin
Thank you for your question.
If it is OK with you, can I see your sample pbix file?
It is quite difficult for me to come up with a desirable solution without seeing the data model.
By only seeing the first two measures, I think those are referencing the date-table to calculate the days-count between the slicer. -> is it not connected?
If it is not connected, I think it is not so easy to put the condition (noweeken) that comes from the date-table.
If it is OK, please share the sample pbix file, then I can try to solve it.
Thank you very much.
it is not connected. It is like calculating the difference between 2 independent dates.
Kindly send me your email id - i can do the wetransfer of the file to you.
I sent my email address via message.
please check your message inbox.
Thank you.
Thanks a lot for the help and support sir.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |