Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Experts,
Looking for help with a measure to calculate the difference in Column Values by Date,
I have created a Measure that gives me the average of the sum of a total clolumn by date ..
This is the measure >
@RandyR1963 , For WOW, please refer by blog, How to use Rank to get last week's value.
AVERAGEX(
Filter ( ALLSELECTED( 'Week/Week Data'[Report Date]),
'Week/Week Data'[Report Date] <= Max('Week/Week Data'[Report Date]) ),
[Total 61>180] )
to solve your problem you have to change this date in your FILTER to be either one week ahead of the date in the current row, or one week behind it.
setup 2 VAR statements before you call AVERAGEX
VAR Prev_Week = DATEADD('Week/Week Data'[Report Date],-7,DAY)
and
VAR Next_Week = DATEADD('Week/Week Data'[Report Date],+7,DAY)
then 2 VAR statements to store the result of calling AVERAGEX with the 2 dates
that will give you 2 VARs you can use to calculate the difference.
Help when you know. Ask when you don't!
@kentyler , Thank you for assisting, I think i am getting a little lost in your discription,
This is how i have interpreted how you have discribed,
My Original Measure was
AVERAGEX(
Filter ( ALLSELECTED( 'Week/Week Data'[Report Date]),
'Week/Week Data'[Report Date] <= Max('Week/Week Data'[Report Date]) ),
[Total 61>180] ) I Created a Copy of the Original Data set so i didn't mess it up, some value names changed.
With the 2 VARs below, i am assuming to replace the BOLD section in original measure with either Next_Week or Prev_Week as in the New measures below
"setup 2 VAR statements before you call AVERAGEX"
VAR Prev_Week = DATEADD('Week/Week Data'[Report Date],-7,DAY)
My Measure >
and
VAR Next_Week = DATEADD('Week/Week Data'[Report Date],+7,DAY)
My Measure >
My Measure >
Help when you know. Ask when you don't!
@kentyler , I am so sorry to cause so much confusion, in which i believe is on my part..
Lets see if i understood you correctly
Created a Measure with
I Also tried with Current_Week added as VAR this way ..
Help when you know. Ask when you don't!
Help when you know. Ask when you don't!
@kentyler .. I'm with you Sir. I really appreciate your dilligence in assisting with this.. as we were working through this, i was able to find an alternative to the issue and get the results i was looking for.
So our next question is what's happening in the measure [SumTotal61>180], does it return a single value... or a set of rows ?
When i drop this into a Table, it returns one value,
when i add the Report date to the Table, it gives me the sum for each Report Date
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
62 | |
59 | |
56 |