Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
Im using tables with months and i need to calculate 1 data where some months the data dont change so i would to get a measure where it will only sum if the values are different then the other month as for example:
Obs: In my data if in 2 months the nLossStudents are equals its means it hadnt changed the number of Students
Sample Data
Month IDClass NLossStudents
1 1 4
2 1 4
3 1 1
1 2 2
2 2 2
3 2 2
Expected Result:
Total LossStudents : 6
Regards Rui Silva.
Solved! Go to Solution.
Hi,
Thanks for the help but i managed to make with this measure:
CALCULATE(SUM(Dados[Set]) - SUM(Dados[Atual]);FILTER(Meses;Meses[IDMes] = MES);FILTER(Dados; Dados[Set] - Dados[Atual] >= 0) )
The first filter its to filter the month , my months has a agregrated values so i could do this one and second one its to dont show values below zero .
Regards Rui Silva
@rui_silva If u want the sum of distinct value the it will be 7 Right why are you saying it has 6?
Try the Measure below
Total = SUMX(DISTINCT(Data[Name]), FIRSTNONBLANK(Data[Value], 0))
Please give like if u like it
Thanks for the assistance but the result giving its wrong maybe its my fault so im going to give some sample data from my source table where im getting the data,because i forgot the put the other column and i apologize for that .
Source table:
IDMonth IDClass nStartStudents nActualStudents
1 1 25 22
1 2 23 21
2 1 25 22
2 2 23 21
3 3 25 20
3 3 23 21
The columns i need to calculate are the nActualStudents with nStartStudents as i dont want to calculate the duplicated ones
Sorry for my mistake i didnt made the other column in the first post.
As i wanted to get a card where would say:
Total LossStudents = 6
Regards , Rui Silva
@chotu27 The Loss Students are from nStartStudents - nActualStudents
The nStartStudent are the number os students who started school year, and the nActualStudent is the number of the current students as pass of the same school year.
The objective of this measure its for a report for my enterprise and i need to get the total loss students but i cant sum the duplicated ones and i stated above all months that have same numbers are nActualStudents and nStartStudents are equal, and i only needed to calculate where nActualStudent are different from the other months.
Regards , Rui Silva
Hi,
So im getting a problem where i need to calculate a measure where it will only sum the first value for nActualStudent and if nActualStudent its equal to other month then it dont sum
Sample data:
IDMonth IDClass nStartStudents nActualStudents
1 1 30 29
1 2 30 25
2 1 30 29
2 2 30 24
Regards , Rui Silva
Hi,
Try this measure
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[nStartStudents]-Data[nActualStudents]))
Hi,
Thanks for the help but i managed to make with this measure:
CALCULATE(SUM(Dados[Set]) - SUM(Dados[Atual]);FILTER(Meses;Meses[IDMes] = MES);FILTER(Dados; Dados[Set] - Dados[Atual] >= 0) )
The first filter its to filter the month , my months has a agregrated values so i could do this one and second one its to dont show values below zero .
Regards Rui Silva
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |