Forum Discussion
yearly sales difference
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
- Anonymous2 years agoNot applicable
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- Anonymous2 years agoNot applicable
hope this helps u sir.
- Anonymous2 years agoNot applicable
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.