The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
11 | |
9 | |
8 |