Forum Discussion
Count current week and previous week
- Anonymous3 years ago
Hi Jiangmei_wu ,
Create this measure.
Measure = var a=SUMMARIZE(ALLSELECTED(Sheet1),Sheet1[location],[Week number],[Date 1],"Current Week Count",[Current Week Count]) return MAXX(FILTER(a,[location] in VALUES(Sheet1[location])&&[Week number] in VALUES(Sheet1[Week number])),[Current Week Count])Measure 2 = SUMX(VALUES('Sheet1'[location]),[Measure])Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years ago
Hi Jiangmei_wu ,
You just need to place [MEASURE] on the card visual object.
Best Regards,
Neeko Tang
Hi Neeco, thank you for your time and patient to help me! Now Previous Week Count is working properly. The daily highest count by location in current week didn't have the result I am looking for in the Table (in the card it is correct). Using Week number 11 as current week which is March 12, 2023 that week in Slicer. In Excel Pivot table, the highest number at Location1 is 3, at Location3 is 4. However, pbix shows 7 for both locations. Plesae see the screenshots below and file links.
Hi Jiangmei_wu ,
Create this measure.
Measure = var a=SUMMARIZE(ALLSELECTED(Sheet1),Sheet1[location],[Week number],[Date 1],"Current Week Count",[Current Week Count])
return MAXX(FILTER(a,[location] in VALUES(Sheet1[location])&&[Week number] in VALUES(Sheet1[Week number])),[Current Week Count])Measure 2 = SUMX(VALUES('Sheet1'[location]),[Measure])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Jiangmei_wu3 years agoFrequent Visitor
One small thing - can the Daily highest number in the current week in Card be 4 instead of 7 (total)?
- Anonymous3 years agoNot applicable
Hi Jiangmei_wu ,
You just need to place [MEASURE] on the card visual object.
Best Regards,
Neeko Tang