Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi guys,
I have a table and I need to sum different criterias in the same column and 1 criteria in other column.
My table:
YEAR | Month | Value
2018 | Jan | 100
2019 | Jan | 10
2019 | Feb | 20
2019 | Apr | 50
2018 | Feb | 25
2019 | Mar | 70
I want to sum for the criterias:
[YEAR] = 2019
[MONTH] = Jan, Feb and Mar
Total: 100
I tried this, but it´s not working:
thanks in advance for helping 🙂
Solved! Go to Solution.
Hiferbyrez,
You could try below measure
Sales 3 Month = CALCULATE ( SUM ( sumif[value] ), FILTER ( sumif, sumif[year] = 2019 && ( sumif[month] = "Jan" || sumif[month] = "Feb" || sumif[month] = "Mar" ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try like this
Sales 3 Month = CALCULATE(sum(Sales[Sales Amount]),year(Sales[Sales Date])=2019 && (month(Sales[Sales Date])=1||month(Sales[Sales Date])=2 ||month(Sales[Sales Date])=3))
Hi, thanks for helping.
I´m not associating to a calendar table, but used your ideia and the result is:
The expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression.
Hiferbyrez,
You could try below measure
Sales 3 Month = CALCULATE ( SUM ( sumif[value] ), FILTER ( sumif, sumif[year] = 2019 && ( sumif[month] = "Jan" || sumif[month] = "Feb" || sumif[month] = "Mar" ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
many thanks everyone !! It´s working now 🙂
Use function like Year and month on a date column then it will not give that issue.
User | Count |
---|---|
98 | |
91 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |