Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi I have created a Current Week Sales measure for my sales report but for some reason the measure does not show total at the bottom. I looked for answers online, and I see most of the solutions recommend to wrap the dax measure within SUMX. I tried doing that but for some reason it did not work, may be I did not apply it properly as I am still learning dax.
I would apprecieate if someone could help me figure out this issue -
Measure:
Current Week Sales =
Thank you in advance
Solved! Go to Solution.
@Anonymous ,
Here is how I did it:
Create 2 measures:
You do not need to calculate the value for each week, just use the measure QTY. Adding Year and Week to the visual gives context to the measure so only that week or same week last year will be shown.
sample data:
Also you can get variance like this:
@Anonymous ,
Here is how I did it:
Create 2 measures:
You do not need to calculate the value for each week, just use the measure QTY. Adding Year and Week to the visual gives context to the measure so only that week or same week last year will be shown.
sample data:
Can anyone please help me?
Ok, you might take a look at using sameperiodlastyear in conjunction with the qty measure.
https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
I have tried this. The sameperiodlastyear function works with dates, but for my result I am using weeks and need the result to sum by weeks (which I am able to achive as you can see in the screenshot), but I also need totals to show up at the bottom. That's the only issue I am having - measure not showing up in Total
Hi @Anonymous ,
This is because there is no SELECTEDVALUE(DateDimension[WeekNum]) or SELECTEDVALUE(DateDimension[Year]) in the totals line. If you want to test this, create a separate measure with either of those 2 values and add it to the table or matrix.
It seems like Qty is working fine- what are you looking to achieve by creating another measure?
I am using Qty to validate numbers against Current Week Sales. My ultimate goal is to create Current Week Sales, Same Week Last Year measure and Same Week Last Year Variance (SWLY Variance) to compare current week vs same week last year numbers. I am able to get the correct numbers at row level for both measures but they are not showing up in totals.
I created separate measures for SELECTEDVALUE(DateDimension[WeekNum]) and SELECTEDVALUE(DateDimension[Year]) as YearTest and WeekTest.
Do I need to update DAX on Current Week Sales too, and add YearTest and WeekTest to the logic?
Current Week Sales =
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |