Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chanleakna123
Post Prodigy
Post Prodigy

Weekly divided by total month

hi , 

i have the data visualize in Week , i can do by month also if i do some hirachy. 

my purpose is to calculate the weekly stability of each week , 

For eg :

W23 : 1360 

W24 : 200 

W25 : 130

W26 : 550 

Total Week :2240 

* Weekly Stability :

W23 : 1360/2240 , 60%

............

 

and the visualization will be reviewed by the person , so when i filter that person it will show me the number of their weekly stability. 

how to acheive this ? 

 

1.PNG

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Chanleakna123 

For your case, the easiest way is add a month hierarchy column for it.

If you don't want this, just try this way:

Step1:

Add a yearmonth column based on date column.

Step2:

Then use this formula to calculate the month total for each weekly.

Month total = var a=CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[YearMonth]=MAX('Table'[YearMonth]))) return
var _table=ADDCOLUMNS('Table',"_value",a) return
SUMX(_table,[_value])

and now, you could use weekly total divide this measure.

 

By the way: For some weeks at the beginning and end of the month, they will be calculated for two months data.

So i think you should add a bin column for these week column every 4 weeks.

and you could use the same logic as above to adjust them.

 

here is my sample pbix, please try it.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-lili6-msft may i know , what is the function of using BIN ? 

i still dun really get it dear . May you help me to find the easiest way to acheive this ? 

thx for your quick support. 

Thanks with Regards, 
Leakna 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.