Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
What I want is the total to equal 2,947,891 for Sumif and Measure 2
The three measures were
Sales£OrdDate2
Solved! Go to Solution.
Hi @RJ
You may refer to below post.
https://community.powerbi.com/t5/Desktop/SUM-Negative-Account-Balances/m-p/544179#M255705
Regards,
Cherie
Brilliant
It worked. Thank you
To make it more effecient. Add 'ADDCOLUMN'
Hi,
Does this work?
=CALCULATE(SUMX(VALUES(Calendar[Month-Year]),[Sales£M]),FILTER(Header,[Sales£M]>0),USERELATIONSHIP(Header[Order Date] , Dates[Date]))
Thanks Ashish
I will try this when I return.
Its an aggregation within an aggregation issue but Power BI must have an solution for this. But I will try your measure later
Ill try this tomorrow
01-14-2017 08:04 PM - edited 01-14-2017 08:08 PM
@MWinter225If you do want Measures - these should work also!
MEASURE 1
Total Adj Sales ALT = SUMX ( 'Table', IF ( 'Table'[Adjustment] = "b", 'Table'[Sales] * 0.9, IF ( 'Table'[Adjustment] = "c", 'Table'[sales] * 0.5, 'Table'[Sales] ) ) )
MEASURE 2 - SWITCH is internally converted into nested IFs - one thing I really like is that its much easier to read and write
Total Adj Sales ALT 2 = SUMX ( 'Table', SWITCH ( TRUE (), 'Table'[Adjustment] = "b", 'Table'[Sales] * 0.9, 'Table'[Adjustment] = "c", 'Table'[sales] * 0.5, 'Table'[Sales] ) )
Now you have 3 options which should all give you the same result!
Good Luck!
Hi @RJ
You may refer to below post.
https://community.powerbi.com/t5/Desktop/SUM-Negative-Account-Balances/m-p/544179#M255705
Regards,
Cherie
Brilliant
It worked. Thank you
To make it more effecient. Add 'ADDCOLUMN'
Hi Cherie
Thanks
This looks promising.
NegativeSum =
VAR tableA = SUMMARIZE ( Table4, Table4[Client ], "a", CALCULATE ( SUM ( Table4[Amount] ) ) )
RETURN CALCULATE ( SUM ( Table4[Amount] ), FILTER ( tableA, [a] < 0 ) )
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |