Forum Discussion
New column creation
- 3 years ago
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
final Balance CC = VAR _mindate = MIN ( Data[Date] ) VAR _initialbalance = MAXX ( FILTER ( Data, Data[Date] = _mindate ), Data[Balance] ) VAR _currentdate = Data[Date] RETURN SUMX ( FILTER ( Data, Data[Date] <= _currentdate && Data[Date] > 1 ), Data[Credit/Debit] ) + _initialbalance
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
final Balance CC =
VAR _mindate =
MIN ( Data[Date] )
VAR _initialbalance =
MAXX ( FILTER ( Data, Data[Date] = _mindate ), Data[Balance] )
VAR _currentdate = Data[Date]
RETURN
SUMX (
FILTER ( Data, Data[Date] <= _currentdate && Data[Date] > 1 ),
Data[Credit/Debit]
) + _initialbalance
- salmankhan_hm3 years agoFrequent Visitor
Hi Kim,
Thanks for the help. you did it correctly but when I use the DAX you shared I am not getting the correct values. Please check the below screenshot:
- Jihwan_Kim3 years agoSuper User
Hi,
Thank you for your message.
The DAX formula that I created was for creating a new column, not a new measure.
- salmankhan_hm3 years agoFrequent Visitor
Hi Kim,
Thank you so much for the help. I got it now. I have another question if you don't mind. What if there is more than one value for Credit/Debit for the same date? how can I get the same result for that case?
Thank you so much 🙂