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.
Hello everyone, I am fairly new to Power BI and am trying to do something which seems relatively easy to accomplish, but I have been struggling with.
I want to aggregate data biweekly and display it on an a graph as the x axis, with the other data showing up on the y axis. Essentially the graph's first point would be (end of two week period , sumof all data values between the period start and end) as (x,y). What would be the best way to acheive this?
Thank you for your time!
Solved! Go to Solution.
Hello, I wanted to follow up on this, I managed to find the solution. You are actually able to use dashboard features to perform "binning" which will create the desired result on my end. Posting this for those with similar problems. Goodluck!
Hello, I wanted to follow up on this, I managed to find the solution. You are actually able to use dashboard features to perform "binning" which will create the desired result on my end. Posting this for those with similar problems. Goodluck!
Hello @v-jianboli-msft , thank you for taking the time to respond to my post! I really appreciate it.
That is not quite what I am trying to achieve, for which I apologize as I could have been more clear with my request. I will clarify my question, I hope you have the time to answer.
Your simple sample is correct, in my situation I have my date and weeknum table in a "date table" and my values coming in from another table. (Not sure if that changes anything, but want to put it out there just in case)
As for the graph, it seems that the first data point would be in week one, which is not what I am trying to achieve. I essentially am trying to get the sum of all values in week 1 and 2, and plot that as the first point in my graph. For the next point in my graph, I want it to be the sum of all values in week 3 and 4, and have that as the next point in my graph. If we consider these two week intervals to be a unit, the graph would display them as unit1, unit2 on the x axis, and the sum on the y axis.
I hope this clarifies everything! Thanks again for your time.
Hi @Anonymous ,
Based on your description, I have created a simple sample:
Then apply the measure:
Measure =
var _a = SELECTEDVALUE('Table'[Week])
var _b = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Week]>=_a&&[Week]<=_a+1))
var _c = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Week]>=_a-1&&[Week]<=_a))
return IF(ISODD(_a),_b,_c)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |