Forum Discussion
Not able to aggregate data into unique categories
VAR MthSince =
DATEDIFF ( 'T360-Matters'[Last Update Date], TODAY (), MONTH )
RETURN
SWITCH (
MthSince,
0, "This Month",
1, "Last Month",
2, "2 Months Ago",
"3+ Months Ago"
)
Hi kh4hk,
Could you post your table structures with some sample/mock data and the expected result, so that we can better assist on this issue?
It's better to just share a dummy pbix file which can reproduce the issue. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. :smileyhappy:
Regards
2 Replies
- v-ljerr-msftMicrosoft Employee
Hi kh4hk,
Could you post your table structures with some sample/mock data and the expected result, so that we can better assist on this issue?
It's better to just share a dummy pbix file which can reproduce the issue. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. :smileyhappy:
Regards
- kh4hkRegular Visitor
I was trying to annonymize the data to share it with you and solved the issue in doing so.
The sorter formula was not aligned with Month Since Update column I shared earlier.
(Before update) Month Since Update Sort = DATEDIFF ( 'T360-Matters'[Last Update Date], TODAY (), MONTH )
(After update) Month Since Update Sort = Var MthSince = DATEDIFF('T360-Matters'[Last Update Date], TODAY(), MONTH) Return IF(MthSince=0,0,IF(MthSince=1,1, IF(MthSince=2, 2, 3)))
Thank you so much for guiding me in right direction, appreciate your help.