Forum Discussion
Allisond
Advocate II
5 years agoMeasure Not Responding to Slicers/Filters
I have a measure dividing a measure for calculating a change (int) and a measure for calculating a max value in a time frame (int). Example Value = Divide([ChangeMeasureInt],[ValueMeasureInt], B...
amitchandak
Super User
5 years agoAllisond , Can you share the formula for 'Patient'[PatientID] (Count), Value (Measure).
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Also refer: Grand total issue -https://www.youtube.com/watch?v=ufHOOLdi_jk
Allisond
Advocate II
5 years agoSure! I am fairly new at this, so bear with me on these.
Patient ID is from a table: 'Weights' [PatientID]
Value Measure: Divide ([Wt Change],[Day30MaxWt], Blank())
Wt Change Measure = Switch (True()),
[Current Stay Prior Wt] = Blank(), [Wt] - [CurrentStayPriorWt]
Day30MaxWt Measure =
VAR MaxDate = MAX(Dates[DayDate]) - 35
VAR MinDate = MAX(Dates[DayDate]) - 25
VAR Change = CALCULATE(MAX(Weights_20190901[Lbs.]), DATESBETWEEN(Dates[DayDate], MaxDate, MinDate))
VAR DateAdmRtn = [LatestAdmRtnDate]
RETURN SWITCH(TRUE(),
[Weight] = BLANK(), BLANK(),
DateAdmRtn > MAX(Dates[DayDate]) - 30, BLANK(), Change)
LatestAdmRtnDate Measure =
VAR FirstVisibleDate = MIN(Dates[DayDate])
VAR PreviousDate = CALCULATE(MAX('Weight'[AdmRtnDate]), Dates[DayDate]<=FirstVisibleDate)
RETURN
PreviousDate
I am sure this is more convoluted than it should be. I am figuring this out step by step. Thank you for looking.