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.
Hello everybody!
I have a table with the following structure linked to my data model:
Item | Date | Value |
A | 01.03.2020 | +550 |
A | 02.03.2020 | -600 |
The Date Column is an active connection to the calendar table.
Then I have a Pivot table like this:
Week | Value |
2020-01 | +5000 |
2020-01 | -50 |
This table shows me the sum for each week.
Now I want a second column in this pivot that shows me the total sum regardless of the week, but just for values above 500.
The following measure is not working:
=CALCULATE(COUNTROWS(tblOne);FILTER(tblOne;tblOne[Value]>500);ALL(tblOne))
=CALCULATE(COUNTROWS(tblOne);ALL(tblOne);FILTER(tblOne;tblOne[Value]>500))
How would you solve that?
Solved! Go to Solution.
Perhaps:
Measure =
SUMX(FILTER(ALL('Table'),[Value]>500),[Value])
Although I can't fathom why you were using COUNTROWS so if you actually want the count, use COUNTX instead of SUMX.
Or... you could try this as well:
[GT500 Total] =
CALCULATE(
SUM( Table[Value] ),
Table[Value] > 500,
ALL( CalendarTable )
)
This one will respect all filters in all dimensions but the ones on CalendarTable. Maybe this is what you wanted?
Best
D
Perhaps:
Measure =
SUMX(FILTER(ALL('Table'),[Value]>500),[Value])
Although I can't fathom why you were using COUNTROWS so if you actually want the count, use COUNTX instead of SUMX.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |