Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
AT_7
Contributor II
Contributor II

Divide Measure evenly among one dimension

Hello Everyone,

I have a requirement to do following , kindly guide 

Dim- Year, Month, Week

Measure -Quantity

I want to calculate Sum of Quantity which is easy but i want to show that Quantity for that particular year and month and week( it should be sum of qty that month /4) so it is evenly distributed for  that weeks of month .

Please see below example

 

Year Month week Qty actual sum of Qty programmatic( sum of qty for that year month divided by 4
2024 1 1 100 800/4 = 200
2024 1 2 300 200
2024 1 3 200 200
2024 1 4 200 200
2023 12 49 50 100
2023 12 50 150 100
2023 12 51 100 100
2023 12 52 100 100
2023 11 48 200 200
2023 11 47 300 200
2023 11 46 200 200
2023 11 45 100 200

 

Labels (1)
2 Solutions

Accepted Solutions
qv_testing
Specialist II
Specialist II

Try this

SUM(TOTAL <Month>[Qty actual])/4

View solution in original post

AT_7
Contributor II
Contributor II
Author

Thank you @qv_testing and @Anil_Babu_Samineni  both of your solution worked, i wonder why i didnt think about adding month  🙂

View solution in original post

5 Replies
qv_testing
Specialist II
Specialist II

Try this

SUM(TOTAL <Month>[Qty actual])/4

Anil_Babu_Samineni

@AT_7 one correction,

SUM(TOTAL <Month>[Qty actual])/Count(week)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
AT_7
Contributor II
Contributor II
Author

Thank you @qv_testing and @Anil_Babu_Samineni  both of your solution worked, i wonder why i didnt think about adding month  🙂

AT_7
Contributor II
Contributor II
Author

Do you guys know if i have to move it to script how to do 

AT_7
Contributor II
Contributor II
Author

Sorry it didnt work when i pull all years . 

what it did is for january it pull out numbers for 2024, 2023 jan and than divide it by 4 😞