Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I am trying to do something in DAX that I can easily do with Excel (show value as difference from previous "x"). In this case, I have a column of Week Numbers with their respective Widget Counts for that week number. In Excel, I can drop into the pivot table and ask it to show me the value difference from the previous week number (regardless of whether it's a date or not). Image below:
I tried something to the effect of:
Solved! Go to Solution.
@lfrosales add following measure
WoW Widget = VAR __prevWeek = MAX( Table1[Week] ) - 1 VAR __thisWeekWidget = SUM( Table1[Widgets] ) VAR __prevWeekWidget = CALCULATE( SUM( Table1[Widgets] ), Table1[Week] = __prevWeek ) RETURN __thisWeekWidget - __prevWeekWidget
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@lfrosales add following measure
WoW Widget = VAR __prevWeek = MAX( Table1[Week] ) - 1 VAR __thisWeekWidget = SUM( Table1[Widgets] ) VAR __prevWeekWidget = CALCULATE( SUM( Table1[Widgets] ), Table1[Week] = __prevWeek ) RETURN __thisWeekWidget - __prevWeekWidget
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thank you so much! I was struggling a couple hours on something that seemed super straightforward and you proved that it was! In my delirium, I accidentally tried adding it as a calculated column and wasn't having any luck, then I realized that you said as a measure! Worked like a charm! The only quirk I will try to work out is that it looks at week 1 of the year and gives it a value equal to that week's widget count. I will try to figure out a way to tell it to ignore Week 1 and continue with the rest.
See below:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |