Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi Power Bi Community!
Below is a screenshot of what I am trying to achieve, I have 2 tables using the same NetSales column. In the car above I want to show the difference for each row between both tables NetSales Column. I have tried so many different things and using 2 different tables to show the % change by date was all I had left for ammo! Recommendations on how to do This Week vs This Week Last Year welcome
Solved! Go to Solution.
Hi @NL-Nicolas ,
1.Please try to add an index column for two table:
Table1:
Table2:
2.add a slicer for with, and create a measure and add it into card visual
Differ =
VAR cur_index =
SELECTEDVALUE ( Table2[Index] )
VAR cur_table1 =
CALCULATE ( MAX ( Table1[NetSales] ), Table1[Index] = cur_index )
VAR cur_table2 =
CALCULATE ( MAX ( Table2[NetSales] ), Table2[Index] = cur_index )
RETURN
cur_table1 - cur_table2
Please refer attached .pbix.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NL-Nicolas ,
1.Please try to add an index column for two table:
Table1:
Table2:
2.add a slicer for with, and create a measure and add it into card visual
Differ =
VAR cur_index =
SELECTEDVALUE ( Table2[Index] )
VAR cur_table1 =
CALCULATE ( MAX ( Table1[NetSales] ), Table1[Index] = cur_index )
VAR cur_table2 =
CALCULATE ( MAX ( Table2[NetSales] ), Table2[Index] = cur_index )
RETURN
cur_table1 - cur_table2
Please refer attached .pbix.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@NL-Nicolas , With help from a week rank column in date/week table
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
You can measures like
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
21 | |
19 | |
13 | |
12 |
User | Count |
---|---|
42 | |
28 | |
23 | |
22 | |
22 |