Forum Discussion
Cumulative Reject Count
- 2 years ago
Hi,
Please check the below picture and the attached pbix file if it suits your requirement.
_cumReject = IF ( ISINSCOPE ( 'Reject Data'[Reject Desciption] ), VAR _allselectedComp = ALLSELECTED ( 'Reject Data'[Reject Desciption] ) VAR _CompTable = ADDCOLUMNS ( _allselectedComp, "@Count", 'Reject Data'[Reject Count] ) RETURN SUMX ( WINDOW ( 1, ABS, 0, REL, _CompTable, ORDERBY ( [@Count], DESC, 'Reject Data'[Reject Desciption], ASC ) ), [@Count] ) )
Hi, Thanks for the replies. Actually i only have one table. There's no other table to link the relation.
I tried to create a new table similar to Item_Dim. Unfortunally i cant use the way you provided. As my reject description has duplicate value due to some of the item have similar reject descriptions as reflected in the table below.
Hence, may i ask is there any other ways to achieve the results?
Thanks.
Hi,
Please provide your sample pbix file's link (onedrive, google drive, dropbox, or others), and then I can try to look into the sample.
- Hongmingk2 years agoFrequent Visitor
Hi,
Kindly find the pbix file's link and the excel file sample link below.
Much apperiacted for your help. Thanks
- Jihwan_Kim2 years ago
Super User
Hi,
Please check the below picture and the attached pbix file if it suits your requirement.
_cumReject = IF ( ISINSCOPE ( 'Reject Data'[Reject Desciption] ), VAR _allselectedComp = ALLSELECTED ( 'Reject Data'[Reject Desciption] ) VAR _CompTable = ADDCOLUMNS ( _allselectedComp, "@Count", 'Reject Data'[Reject Count] ) RETURN SUMX ( WINDOW ( 1, ABS, 0, REL, _CompTable, ORDERBY ( [@Count], DESC, 'Reject Data'[Reject Desciption], ASC ) ), [@Count] ) )- Hongmingk2 years agoFrequent Visitor
Hi,
It work perfectly! Thanks alot for your assist and guidance.
Thanks.