Forum Discussion
22LACMT
3 years agoHelper III
Dax expression
Im trying to create a new column that sums the exposure by date. the date column has 5 unique dates this column should likewise only show 5 diffent totals. this is my expression and I am getting errors. ?
Totaltier1PIT1 = CALCULATE(sum('Portfolio Percentage totals PIT'[Tier1Exposure]), 'Portfolio Percentage totals PIT'[ver])
sample
Hi 22LACMT ,
You can create a column as below:-
Totaltier1PIT1 = CALCULATE ( SUM ( 'Portfolio Percentage totals PIT'[Tier1Exposure] ), FILTER ( 'Portfolio Percentage totals PIT', 'Portfolio Percentage totals PIT'[ver] = EARLIER ( 'Portfolio Percentage totals PIT'[ver] ) ) )22LACMT , Yes you can add additional column as filter in the expression.
4 Replies
- Samarth_18Community Champion
Hi 22LACMT ,
You can create a column as below:-
Totaltier1PIT1 = CALCULATE ( SUM ( 'Portfolio Percentage totals PIT'[Tier1Exposure] ), FILTER ( 'Portfolio Percentage totals PIT', 'Portfolio Percentage totals PIT'[ver] = EARLIER ( 'Portfolio Percentage totals PIT'[ver] ) ) )- 22LACMTHelper III
Perfect thank you!
- 22LACMTHelper III
If I wanted to group the exposure by a category using a category column and point in time would I use the above and add an additional filter funtion for the category column?
- Samarth_18Community Champion
22LACMT , Yes you can add additional column as filter in the expression.