Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to have a measure that calculates the rolling sum of working days from the beginning of the month until the selected working day.
I have a Date table where I created:
Example: If I will select # of working numbers = 10 with January/2022, the measure will calculate from 3rd of January( the first working day in the month), until 14th of January (the 10th working day)
Solved! Go to Solution.
Hi @adrianPadurariu ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a table. Use the column of the new table as slicer.
SlicerTable = GENERATESERIES(1,35,1)
(3)We can create a measure.
Measure =
var _a=CALCULATE(SUM('Fact table'[TotalFacialValue]),FILTER(ALLSELECTED('Calendar'),[# working days]<= SELECTEDVALUE('SlicerTable'[slicer working day]) && [# working days]=1 && 'Calendar'[WorkDay]<>0))
var _b=CALCULATE(SUM('Fact table'[TotalFacialValue]),FILTER(ALLSELECTED('Calendar'),[# working days]<= SELECTEDVALUE('SlicerTable'[slicer working day]) && [# working days]<>1 && [# working days]<>0))
return IF([# working days]=SELECTEDVALUE('SlicerTable'[slicer working day]),_a+_b,BLANK())
(4) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @adrianPadurariu ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a table. Use the column of the new table as slicer.
SlicerTable = GENERATESERIES(1,35,1)
(3)We can create a measure.
Measure =
var _a=CALCULATE(SUM('Fact table'[TotalFacialValue]),FILTER(ALLSELECTED('Calendar'),[# working days]<= SELECTEDVALUE('SlicerTable'[slicer working day]) && [# working days]=1 && 'Calendar'[WorkDay]<>0))
var _b=CALCULATE(SUM('Fact table'[TotalFacialValue]),FILTER(ALLSELECTED('Calendar'),[# working days]<= SELECTEDVALUE('SlicerTable'[slicer working day]) && [# working days]<>1 && [# working days]<>0))
return IF([# working days]=SELECTEDVALUE('SlicerTable'[slicer working day]),_a+_b,BLANK())
(4) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, it's working.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |