Forum Discussion
sum columns between 2 dates
Hi all
I've this table
I need to have a column or a measure that sum for every "customer no" and between 2 dates selected, the columns with amount (SALDO).
Pls check if this is what you want
14 Replies
- ryan_mayuSuper User
- DiePicResolver II
Hi ryan_mayu and thank you for your reply
your suggestion is perfect for the 1st part of my goal.
now I need to insert a column that contain for every "customer code" (1st column):
(sum AVERE) - (sum DARE) for the period previous the 1st data in the slicer.There is a dax formula or another way to do that?
....
I try with this dax formula but resul is all fields blanksCALCULATE (SUM ( Movimenti[SALDO] ),FILTER (Movimenti,Movimenti[Customer No_] = [SelectedCliente]&& Movimenti[Accounting Date] < [DataInizio]))... where [SelectedCliente] and [DataInizio] are 2 measures that working
[DataInizio] = DATEVALUE(CALCULATE(MIN('Movimenti'[Accounting Date]),ALLSELECTED(Movimenti)))[SelectedCliente] = SELECTEDVALUE(Movimenti[Customer No_])
- ryan_mayuSuper User
could you pls provide sample data (not the screenshot) and the expected output. I can't find the soution based on the screenshots and DAX you provided
- DiePicResolver II
Maybe it's not the best way and if some expert will suggest another idea, it will be apprecied, because in that way, I've a file with double weight.
.....
I solved duplicating the query/table "Movimenti" in "Movimenti2" and I've applied the measure on the 2nd table ... in this way it's working for me. - vk_pbiResolver II
Hi,
If you need static table.. then you can use power query group by function to generate a new table