Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
CALCULATE(
SUM(Transactions[Amount]),
FILTER(
Transactions,
Transactions[Amount] < 0 &&
MONTH(Transactions[date]) = MONTH(Bank_Calendar[Date])
)
)
can anyone correct this for me?
Solved! Go to Solution.
Hi @angelc ,
First of all, many thanks to @some_bih for your very quick and effective replies, and I will give some additions below:
1.Create the sample table.
2.Create the calendar table.
3.Create the connection between two tables.
4.Create the measure to calculate the total.
Total Per Month =
VAR sel_mon = SELECTEDVALUE(Bank_Calendar[Date])
RETURN
CALCULATE(
SUM('Transactions'[Amount]),
FILTER(
'Transactions',
'Transactions'[Amount] < 0 &&
MONTH('Transactions'[Date]) = MONTH(sel_mon) &&
YEAR('Transactions'[Date]) = YEAR(sel_mon)
)
)
5.Drag the measure into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @angelc ,
First of all, many thanks to @some_bih for your very quick and effective replies, and I will give some additions below:
1.Create the sample table.
2.Create the calendar table.
3.Create the connection between two tables.
4.Create the measure to calculate the total.
Total Per Month =
VAR sel_mon = SELECTEDVALUE(Bank_Calendar[Date])
RETURN
CALCULATE(
SUM('Transactions'[Amount]),
FILTER(
'Transactions',
'Transactions'[Amount] < 0 &&
MONTH('Transactions'[Date]) = MONTH(sel_mon) &&
YEAR('Transactions'[Date]) = YEAR(sel_mon)
)
)
5.Drag the measure into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @angelc
Order is important, if you do not have already it
1. Create Date / Calendar table - link
2. Create connection for Date and Fact table - link
3. v2 for measure
CALCULATE(
SUM(Transactions[Amount]),
FILTER(
Transactions,
Transactions[Amount] < 0 &&
)
)
Proud to be a Super User!
User | Count |
---|---|
53 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
92 | |
86 | |
39 | |
24 | |
22 |