Forum Discussion
Akbera1
Helper I
5 years agostuck in an issue
Hey, Guys i am stuck, the scenario is, Transactions are like this. SalesID DC No. OrderQty Qty Date and time So-000001 DC-000001 100 ...
msarmento
5 years agoFrequent Visitor
If I got your problem right, you could just create a calculated column to create a new index for DC by Sales ID and use it on a Matrix visual.
Here is the DAX that I created for this column:
DC Ordered =
VAR CurrentSalesID = [SalesID]
VAR CurrentDate = [Dateandtime]
RETURN
"DC - " &
CALCULATE(
DISTINCTCOUNT([DCNo]),
FILTER(
ALL('Table'),
'Table'[SalesID]=CurrentSalesID
&& 'Table'[Dateandtime] <= CurrentDate
)
)
And here is a matrix using this new calculated column: