Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have two columns one is reporting week column and result value.
Here in reporting week column the data is like below
1. 4/1/2023
2. 3/25/2023
3. 3/18/2023 like goes on with a week dates..
another column contains numeric values.
so my problem is i was unable to make this reporting week as hierarchy to get day, year,week or even i do not have a seperate date column aswell to achieve above measures.
Need hlep in achieving above calculations
Solved! Go to Solution.
Hi @Durga5prasad96 ,
Do you want to get a rolling values over the reporting week? If yes, you can create a measure as below. Please find the details in the attachment.
Measure =
CALCULATE (
SUM ( 'Table'[result value] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[reporting week] <= SELECTEDVALUE ( 'Table'[reporting week] )
)
)
If the above one can't help you get the expected result, could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hello @v-yiruan-msft
First of all Thank you for your response on this.
The above calculation is giving the rolling week values like from low to high, But in my calculation it might be negative or high as we are comapring with previous weeks. Sample Data
required dax function However i need dax calculation for Rolling 3 weeks Average growth & Week over week growth % for above data
I have 3 columns in my table as you create a sample pbix
1. Reporting week
2. Result value
3. store name
4. city
Based on above three columns we need to get the above 2 calculations ( Rolling 3 weeks Average Growth & Week over Week Growth)
So iam attaching the pbix where i have entered sample data in table2. So here we should calculate above functions based on stores
for example : for Adidas week over week growth % value we should show( by using reporting week and result column ) like wise.. also Rooling 3weeks growth % .
So attached sample table and required so please look into it and help me
Thank you
Hi @Anonymous ,
I didn't find the attached table, could you please paste the data in your post directly? Or you can refer the following link to upload your sample pbix file to the community. Thank you.
How to upload PBI in Community
In addition, you can refer the following threads to get the Rolling 3 weeks Average Growth & Week over Week Growth:
Rolling x weeks average:
Week over Week Growth %:
Week over week growth percent =
VAR _cwvalue =
SUM ( Table[Sales] )
VAR _pwvalue =
CALCULATE (
SUM ( Table[Sales] ),
FILTER (
ALL ( Table ),
Table[Year] = MAX ( Table[Year] )
&& Table[WeekNumber]
= MAX ( Table[WeekNumber] ) - 1
&& Table[WeekDay] = MAX ( Table[WeekDay] )
)
)
RETURN
DIVIDE ( _cwvalue - _pwvalue, _pwvalue )
Best Regards
Hi @Durga5prasad96 ,
Do you want to get a rolling values over the reporting week? If yes, you can create a measure as below. Please find the details in the attachment.
Measure =
CALCULATE (
SUM ( 'Table'[result value] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[reporting week] <= SELECTEDVALUE ( 'Table'[reporting week] )
)
)
If the above one can't help you get the expected result, could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
User | Count |
---|---|
134 | |
68 | |
68 | |
54 | |
52 |
User | Count |
---|---|
207 | |
95 | |
64 | |
61 | |
57 |