Forum Discussion

Jiangmei_wu's avatar
Jiangmei_wu
Frequent Visitor
3 years ago
Solved

Count current week and previous week

Hi there, I have to count current week and previous week using a visualization card each week. here is the excel file. The Dax I wrote for previous week gave me a blank. for current week, I simplely...
  • Anonymous's avatar
    Anonymous
    2 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. 

     

     

     

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Jiangmei_wu ,

     

    You just need to place [MEASURE] on the card visual object.

    Best Regards,

    Neeko Tang