Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I am looking for some guidance on how to display a previous week's total on a card visualization. The functions I am using work very well on a table but not on a card. Any help is greatly appreciated.
<Apps PW =
VAR CurrentWeek = SELECTEDVALUE(DimDate[Week of Year])
Var CurrentYear = SELECTEDVALUE(DimDate[YearNumber])
Var MaxWeekNumber = CALCULATE(MAX(DimDate[Week of Year]), ALL(DimDate))
RETURN
SUMX(FILTER(ALL(DimDate),
IF(CurrentWeek = 1 ,
DimDate[Week of Year] = MaxWeekNumber && DimDate[Year] = CurrentYear - 1,
DimDate[Week of Year] = CurrentWeek -1 && DimDate[Year] = CurrentYear)),
[Total Applications])>
Regards, Patricio
Solved! Go to Solution.
Hi @solowolf ,
You could try to use below measure to see whether it work or not.
Measure = CALCULATE(SUM('Table'[amount]), FILTER(ALLEXCEPT('Table','Table'[name]), YEAR('Table'[date])=SELECTEDVALUE('Table 2'[year]) && WEEKNUM('Table'[date])=MAX('Table 2'[week])-1))
You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Thank you so much for your help. I ended up doing a poor man's fix to this. In my date table from the source (SQL Query) I flagged the following using columns before bringing them into my model:
1. prior day =1
2. prior week =1
3. prior month = 1
4. prior year =1
...and I did the same for current, day, week, month and year.
This way I was able to write a simple DAX formula like such:
Hi @solowolf ,
You could try to use below measure to see whether it work or not.
Measure = CALCULATE(SUM('Table'[amount]), FILTER(ALLEXCEPT('Table','Table'[name]), YEAR('Table'[date])=SELECTEDVALUE('Table 2'[year]) && WEEKNUM('Table'[date])=MAX('Table 2'[week])-1))
You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Thank you so much for your help. I ended up doing a poor man's fix to this. In my date table from the source (SQL Query) I flagged the following using columns before bringing them into my model:
1. prior day =1
2. prior week =1
3. prior month = 1
4. prior year =1
...and I did the same for current, day, week, month and year.
This way I was able to write a simple DAX formula like such:
User | Count |
---|---|
90 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
72 | |
60 | |
59 |