The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
Good day! I just need some help on my DAX formula
I'm comparing weekly data. I'm comparing week 1 data of this year to the week 1 data of last year. I have already my formula and the result is correct. But there is no total at the bottom of the table visual. See below.
No sub total for the measure Print Cost Last Year
Here is the formula for the Print Cost Last Year
PRINT COST LAST YEAR =
var currentyear = SELECTEDVALUE(Dates[Year])
var lastyear = currentyear-1
var currentweekofyear = SELECTEDVALUE(Dates[Week of Year])
var computedPrintCostLastYr = CALCULATE([TOTAL PRINT COST],Dates[Year]=lastyear && Dates[Week of Year]=currentweekofyear)
return
if (computedPrintCostLastYr=BLANK(),0,computedPrintCostLastYr)
If you need the powerbi file and the excel source file I can provide it since every data is just a sample.
Thank you very much.
@jc_pbi , return this and try
Sumx(addcolumns(summarize(Dates, Dates[Year], Dates[Week]), "_1", CALCULATE([TOTAL PRINT COST],Dates[Year]=lastyear && Dates[Week of Year]=currentweekofyear)),[_1])
Hi @amitchandak
Still with no sub total.
Here is the whole formula.
Hi @amitchandak
Can you download the powerbi file here.
https://1drv.ms/u/s!Ak_Zk0w2DJj5czWWdW8v7RwKGx4?e=3soHg5
All data are just sample. Just go the report page 3. You may ignore the others report pages.
Thank you very much.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |