Forum Discussion
Narasimha
9 years agoHelper I
Last 4 weeks data
Hi team..i want to display last 4 weeks data in column chart. At any point it is showing 4 weeks data. Could you please help me with step by step process.
Narasimha
9 years agoHelper I
I was created new calculated column with below DAX
Last4Weeks = IF(DATEDIFF(ClosedTickets[PResolveDate],TODAY(),WEEK)<5 && MONTH(ClosedTickets[PResolveDate]) <> WEEKNUM(today()),"YES" ,"NO")
v-yulgu-msft
9 years agoMicrosoft Employee
Hi Narasimha,
Do you want to always display the last 4 weeks data in column chart?
Suppose there are these columns in source table: ClosedTickets[PResolveDate], ClosedTickets[Amount], ClosedTickets[Category]. Then, you should create a measure using this formula:
Sum Amount =
CALCULATE (
SUM ( ClosedTickets[Amount] ),
FILTER (
ClosedTickets,
DATEDIFF ( ClosedTickets[PResolveDate], TODAY (), WEEK ) < 5
)
)
Drag this measure into value section.
If I have something misunderstood, please correct me.
Best regards,
Yuliana Gu