Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
hello guys.
i want to get the sales difference between years for that day of the week for that week in particularly.
for ex. for P1W1 Tuesday sales for 2022 is 1813 and and for year 2023 is 1913 so the difference of sales would be 100. similary for wed, and all the days of all the weeks. i want a generalized formula so that it can be applied for all future years also.. i mean if i add up data for 2020 and 2021 then i can check difference of these years or if i want i can check it for year 2020 and 2023 also....very flexible formula.
Thank you
Hi @Anonymous ,
Please try this way.
Here is my sample dataset:
I create three slicers:
Use these three DAXs to create three measures to calculate:
HWS_CurrectYear =
VAR C_Year = SELECTEDVALUE('Table'[Year])
VAR C_Period = SELECTEDVALUE('Table'[Period])
VAR C_Day = SELECTEDVALUE('Table'[Day])
RETURN
CALCULATE(
MAX('Table'[HWS]),
FILTER(
ALL('Table'),
'Table'[Year] = C_Year && 'Table'[Period] = C_Period && 'Table'[Day] = C_Day
)
)HWS_NextYear =
VAR C_Year = SELECTEDVALUE('Table'[Year])
VAR C_Period = SELECTEDVALUE('Table'[Period])
VAR C_Day = SELECTEDVALUE('Table'[Day])
VAR Value_HWS =
CALCULATE(
MAX('Table'[HWS]),
FILTER(
ALL('Table'),
'Table'[Year] = C_Year + 1 && 'Table'[Period] = C_Period && 'Table'[Day] = C_Day
)
)
RETURN
IF(
ISBLANK(C_Year + 1),
0,
Value_HWS
)DIFFERENCE = 'Table'[HWS_NextYear] - 'Table'[HWS_CurrectYear]
The results are shown below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hello sir, thank you for ur solution but my requirement is to show in a table not in card. omewhat like this format. here each row is period and week..i.e p1w1,p1w2,p1w3
Hi @Anonymous ,
I'm sorry I don't quite understand what results you need to get? I don't quite understand the graph you gave me,
could you please show your desired results in excel or some other form?
For example, what kind of result should he get from the sample dataset I used, according to your expectations?
Best Regards,
Dino Tao
hope this helps u sir.
If you send me proper sample data, I can do this visual for you. I think...
Hi @Anonymous ,
I'm sorry to say that the visual object format you're looking for can't be realized in Desktop at this time, but I suggest you post this idea on the idea forum, and hopefully it will be implemented in a future version of Desktop.
Home (microsoft.com)
This section can be implemented separately, but the "Difference" field cannot be displayed:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
can we develop any measure for this or is this can be done by formula ??
I would suggest you create (calculate) a reference column +1 year, based on which you self merge the table.
This way for one line you would get the actual value and the -1 year value and then you do the calculation you need.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.