Forum Discussion
ArchStanton
Power Participant
1 month agoRetrieving Values from Single Column
Hi, I have the following simple table in my Datamodel: Month Active caseload 01 March 2026 100 April 2026 ...
- 1 month ago
I have realised my mistake and deleted that post. I had also tried a solution as
Current Total = VAR _T = TOPN( 1, FILTER(CaseLoad,CaseLoad[Active Caseload]<>BLANK()), MONTH(CaseLoad[Month Year]),DESC) RETURN MAXX(_T,CaseLoad[Active Caseload])Previous Total = VAR _T = TOPN( 2, FILTER(CaseLoad,CaseLoad[Active Caseload]<>BLANK()), MONTH(CaseLoad[Month Year]),DESC) VAR _previous_date = MINX(_T,CaseLoad[Month Year]) RETURN CALCULATE(SUM(CaseLoad[Active Caseload]),CaseLoad[Month Year]=_previous_date)Is this a right approach.
aswathimohan
Advocate I
1 month agoI have realised my mistake and deleted that post. I had also tried a solution as
Current Total =
VAR _T =
TOPN(
1,
FILTER(CaseLoad,CaseLoad[Active Caseload]<>BLANK()),
MONTH(CaseLoad[Month Year]),DESC)
RETURN
MAXX(_T,CaseLoad[Active Caseload])Previous Total =
VAR _T =
TOPN(
2,
FILTER(CaseLoad,CaseLoad[Active Caseload]<>BLANK()),
MONTH(CaseLoad[Month Year]),DESC)
VAR _previous_date = MINX(_T,CaseLoad[Month Year])
RETURN
CALCULATE(SUM(CaseLoad[Active Caseload]),CaseLoad[Month Year]=_previous_date)Is this a right approach.
ArchStanton
Power Participant
1 month agoHi, this has worked, thanks so much!
Before I mark this as a solution, I want to get to bottom why the other solution provided by an expert is failing.
- Praful_Potphode1 month ago
Super User
Hi ArchStanton
TOPN is performing sorting by MonthYear Column which is numeric.
when the February 2027 will be selected, TOPN will put December(12) has first value .so even though you have january and februray data, it will still give decmber as current.
Thanks and Regards,
Praful