Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Guys,
Can anybody point me in the right direction with this please?
I need to create a measure which sums up the values in a column, but only looks at the most recent period per plant (ignoring all the previous preiods). I've highlighted in the picture below which rows it should sum up.
So rather than adding up the values for every sinlge month per location (making the total 190), it should just look at the most recent month, so it'd calculate 13+14+2 =29.
Any ideas?
Solved! Go to Solution.
Hi @Anonymous ,
You can create a measure as below:
Measure =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[Plant],
"maxperiod", MAX ( 'Table'[Period] ),
"mjFinding", MAX ( 'Table'[No of Major Findings] )
)
RETURN
SUMX ( _tab, [mjFinding] )
Best Regards
Rena
Hi @Anonymous
take a look at the following solution:
Sum of No of Major Findings = SUM('Table'[No of Major Findings])
Sum of No of Minor Findings = SUM('Table'[No of Minor Findings])
Recent No of Major Findings =
CALCULATE(
[Sum of No of Major Findings],
FILTER(
ALLEXCEPT('Table','Table'[Plant]),
MAX('Table'[Periad]) = 'Table'[Periad]
)
)
Recent No of Minor Findings =
CALCULATE(
[Sum of No of Minor Findings],
FILTER(
ALLEXCEPT('Table','Table'[Plant]),
MAX('Table'[Period]) = 'Table'[Period]
)
)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi @Anonymous ,
You can create a measure as below:
Measure =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[Plant],
"maxperiod", MAX ( 'Table'[Period] ),
"mjFinding", MAX ( 'Table'[No of Major Findings] )
)
RETURN
SUMX ( _tab, [mjFinding] )
Best Regards
Rena
@Anonymous , You can do it like
But you need a sortable month like YYYYMM Format
calculate( [no of maajor finidng], filter( Table,[Month Year Sort] = max(Month Year Sort])), allexcept(Table, Table[Plant]))
calculate(sum(Table [no of maajor finidng]), filter( Table,[Month Year Sort] = max(Month Year Sort])), allexcept(Table, Table[Plant]))
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |