Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to find Weekly Sum in a table , I have a pretty extensive Date table which uniquely identifies a Week. However, it's not working and I am not able to understand why .
What I want is that _MaxWeeklyImpressions should give Sum of All Weekly Impressions .
The value against Each individual date of W46 2017 should be 43,795 ( 8003+7792+7891+7473+6808+5282)
Calculation I am using is :
Any Idea what I am doing wrong here ? Or how It can be achieved ?
Thanks
Solved! Go to Solution.
Hi @digitalau ,
To use VALUES function should work.
Measure = CALCULATE ( SUM ( 'Table'[values] ), FILTER ( ALL ( 'Table' ), 'Table'[date] <= MAX ( 'Table'[date] ) ), VALUES ( 'Table'[Wn] ), VALUES ( 'Table'[date].[Year] ) )
Hi @digitalau ,
To use VALUES function should work.
Measure = CALCULATE ( SUM ( 'Table'[values] ), FILTER ( ALL ( 'Table' ), 'Table'[date] <= MAX ( 'Table'[date] ) ), VALUES ( 'Table'[Wn] ), VALUES ( 'Table'[date].[Year] ) )
Hi @digitalau ,
First, make sure you are using a Calculated Measure for _MaxWeeklyImpressions.
If you already are, then it is probably that ALLEXCEPT is not working because you are refering to another table.
I would suggest to bring your Week column into the same table as Impressions, as such:
Create new calculated column in ImpressionShare Table:
NEW WEEK COLUMN = LASTNONBLANK( 'Date'[FW Week Year] , 0 )
Then Update your _MaxWeeklyImpressions measure , as such:
_MaxWeeklyImpressions = CALCULATE( SUM(ImpressionShare[Impressions]), ALLEXCEPT('ImpressionShare','ImpressionShare'[NEW WEEK COLUMN) )
Let me know if anything is unclear.
Cheers,
Rob
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Robin,
Thank you for the reply. It is a measure already.
It looks like ALLEXCEPT is not working .
They're coming from different tables linked together with Date Column. ( 1 to Many from Date to ImpressionShare)
The reason I would not want to bring Impressions to Date table is that I am going to have "Date" connections with 12 tables and for several other columns.
I am trying to understand the logic of why it's not working .
There's a 1 to many link between Date and Impression table
I tried using the method you mentioned .
1. Created a column in ImpressionShare Table : _Week4Impressions , which gives me a week entry in ImpressionShare column
2. Created _SumWeeklyImpressions :
hi in case you need it. this is what I did to get my total per week