Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I need to count of Students who attended only Maths. Please find the sample data below.
load * inline [
StudentId,Subject
1, Maths
1, Physics
2, Maths
2, Chemistry
3, Physics
3, Maths
4, Maths
5, Chemistry
6, Maths
]
Result : Count of StudentId who attended only Maths - ie 2.
I need to achieve this in text object, only with set Analysis or If condition. No change in data model.
please let me know if you got any idea. Thanks in advance.
Hi, I need only count of StudentId who attended only Maths. Ie result should be 2.
StudentId : 4 and 6. Only these 2 students attended only Maths.
@rubenmarin Thanks for the support. It’s working fine.
But 1 doubt, how count of distinct subject are aggregated by student only. In case if I have multiple columns then how it behaves.
Hi, I don't underestand the problem with multiple columns, can you expand the question with sample data?
The expresion works with 2 conditions: having Maths as subject and having only one subject, so this only subject has to be Maths to be counted.