Forum Discussion
show data on two dates in one table
- Anonymous6 years ago
Hi Anonymous ,
You will need to create two slicer tables and four measures.
slicer1 = DISTINCT('Table'[Date]) slicer2 = DISTINCT('Table'[Date])Date1 Category = CALCULATE(SELECTEDVALUE('Table'[Category]),FILTER(ALLSELECTED('Table'),'Table'[Date]=SELECTEDVALUE(slicer1[Date])&&'Table'[ProductId]=SELECTEDVALUE('Table'[ProductId]))) Date1 Amount = CALCULATE(SELECTEDVALUE('Table'[Amount]),FILTER(ALLSELECTED('Table'),'Table'[Date]=SELECTEDVALUE(slicer1[Date])&&'Table'[ProductId]=SELECTEDVALUE('Table'[ProductId]))) Date2 Category = CALCULATE(SELECTEDVALUE('Table'[Category]),FILTER(ALLSELECTED('Table'),'Table'[Date]=SELECTEDVALUE(slicer2[Date])&&'Table'[ProductId]=SELECTEDVALUE('Table'[ProductId]))) Date2 Amount = CALCULATE(SELECTEDVALUE('Table'[Amount]),FILTER(ALLSELECTED('Table'),'Table'[Date]=SELECTEDVALUE(slicer2[Date])&&'Table'[ProductId]=SELECTEDVALUE('Table'[ProductId])))Use the date column from these two slicer tables and the result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for your reply.
There will be many categories, and the total number of categories are unknown, we can always have new categories too.
A product can be categorized into Group A on day 1, and categorized to Group B on day 2, and categorized back to Group A on day 3, and so on.
There's no pattern on how product is categorized. We just treat the category as an attribute of products.
Thanks,
Michael
- Anonymous6 years agoNot applicable
hi vanessafvg,
yes there can be variable amount of dates, right now we have one year dates.
thanks,
Michael