Forum Discussion
Column Bar Chart Split from the same data?
- 6 years ago
Hi Anonymous ,
First, create an unrelated calendar table as slicer.
DimDate = ADDCOLUMNS(CALENDAR("20/04/2020","28/05/2020"),"week", WEEKNUM([Date]))Create measures to filter data from previous week and previous day.
last_day = IF(MAX('Table'[date])<=SELECTEDVALUE(DimDate[Date])&&MAX('Table'[date])>=SELECTEDVALUE(DimDate[Date])-1,1,0)Last Week = VAR CURRENT_WEEK = SELECTEDVALUE(DimDate[week]) VAR CURRENT_YEAR = YEAR(SELECTEDVALUE(DimDate[Date])) RETURN IF(MAX('Table'[week])<=CURRENT_WEEK&&MAX('Table'[week])>=CURRENT_WEEK-1&&YEAR(MAX('Table'[date]))=CURRENT_YEAR,1,0 )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you. As a newbie though...is that coding something I need to enter? or is that the logic behind the slicer?
Hi Anonymous ,
Yes, you need to create a measure and apply it to the visual level filter as the picture show.
You can refer to .pbix for more details.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi there. I did open the sample file...but still do not know where I would be adding those formulas your provided.