Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
HI all, Have been messing around with this way too long. I think I need a sumx but can't get this to work.
I have a matrix that is not showing totals correctly.
If m_base sales are less than zero, I don't want to include them in my total. I created a new measure called m_base sales 2 with an if statement, but the totals are the same for both columns. Help!!!
m_base sales2 =
VAR CurrentStartDate =
DATE ( 2018, 12, 31 )
VAR CurrentEndDate =
DATE ( 2019, 10, 01 )
VAR Basesales =
CALCULATE (
SUM ( 'a_table'[Sales] ),
'a_table'[Transaction Date] >= CurrentStartDate,
'a_table'[Transaction Date] < CurrentEndDate
)
RETURN
IF ( basesales > 0, basesales, 0 )
Well, it's easy. You have to loop over accounts:
[m_base sales2] =
SUMX(
Account,
var __sales = [m_base sales]
RETURN
(__sales > 0) * __sales
)
Best
D
Here is quick workaround:
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |