The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello BI-Community,
i´m struggling to get a running total of working days.
I have a Date Table that is already filtered based on working days. So only dates, which are a working date, are visible.
I even have a specific column in my date table that shows a 1 if it is a working date.
Let´s say we take todays date, i need the following result.
Anyonw who knows how to solve this???
Solved! Go to Solution.
Try replacing
MIN('Date table'[Datum])
with
CALCULATE( MIN('Date table'[Datum]), ALLSELECTED('Date table'))
I just figured it out with a little bit of a workaround!
I tried to replace the measures like you mentioned before, but see attached the results.
Thank you very much for your response anyway! It was the needed push to get the right result
I think this should do it
Running total working days =
VAR startDate =
MIN ( 'Date'[Date] )
VAR endDate =
MAX ( 'Date'[Date] )
VAR result =
CALCULATE (
SUM ( 'Date'[Is working day] ),
DATESBETWEEN ( 'Date'[Date], startDate, endDate )
)
RETURN
result
Thanks for your Reply johnt75!
Unfortunatel it dowsn´t work with my file 😞
On the visual are you using the date column from your date table, or are you using a column from another table ? The way I had envisaged this working is that you would use the date column from your date table which would be set up with a one-to-many relationship to any other tables
Iam using my date table to set up a slicer and everything else.
See attached the result from your measure. It doesn´t count them properly...
Try replacing
MIN('Date table'[Datum])
with
CALCULATE( MIN('Date table'[Datum]), ALLSELECTED('Date table'))
I just figured it out with a little bit of a workaround!
I tried to replace the measures like you mentioned before, but see attached the results.
Thank you very much for your response anyway! It was the needed push to get the right result
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |