Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |