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.
Heres the situation, according to my dataset(made one fast on Excel to speed things up) i need to retrieve the amount of students which the sum of values is equal to 0:
Heres the dataset:
Ive tried to create this measure :
Measure = CALCULATE(DISTINCTCOUNT(Table1[ID_Student]), FILTER((Table1, SUM((Table1[Value])=0))+0
But it always returning 0 instead of the expect result which is 2.
Solved! Go to Solution.
Okay, thank you. Try this:
Measure =
VAR __table = SUMMARIZE('Table','Table'[Student],"__sum0",SUM('Table'[Value]))
RETURN COUNTX(FILTER(__table,[__sum0]=0),[Student])
Proud to be a Super User!
Hi @BostonBI
please try
Measure1 =
SUMX (
VALUES ( Table1[ID_Student] ),
INT ( CALCULATE ( SUM ( Table1[Value] ) ) = 0 )
)
Hi @BostonBI
please try
Measure1 =
SUMX (
VALUES ( Table1[ID_Student] ),
INT ( CALCULATE ( SUM ( Table1[Value] ) ) = 0 )
)
Okay, thank you. Try this:
Measure =
VAR __table = SUMMARIZE('Table','Table'[Student],"__sum0",SUM('Table'[Value]))
RETURN COUNTX(FILTER(__table,[__sum0]=0),[Student])
Proud to be a Super User!
You got that Right,Thank you Alot!
Hi,
my solution:
Measure =
VAR __table =SUMMARIZE(FILTER('Table','Table'[Value]=0),'Table'[Student],"__count0",count('Table'[Subject]))
RETURN sumx(__table,[__count0])
Proud to be a Super User!
Theres actually 4 students on my example, Which 2 of them got only 0 In theis values. Summarizing:
I need to return the amount of students which all values Science,Math and English are 0.
User | Count |
---|---|
24 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |