Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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.