Forum Discussion
IamTDR
5 years agoResponsive Resident
Need Help Summing a Total
Hi I am trying to the PIU column to sum to 450 instead of 204. Is this possible? I have 23 distinct ProductIDs and two distint ProgCodes that will always be 200/250. Not sure how to proceed...
IamTDR
5 years agoResponsive Resident
PIU =
VAR _min =
MIN ( Test_Data[ProgramAdmissions] )
VAR _max =
MAX ( Test_Data[ProgramAdmissions] )
VAR _same = _min = _max
RETURN
IF ( _same, _min, _min + _max )
This worked on my small sample data, but when I tried to use in my BI report I receive a "The end of the input was reached" message.
This worked on my small sample data, but when I tried to use in my BI report I receive a "The end of the input was reached" message.
DataZoe
5 years agoMicrosoft Employee
IamTDR hmm, not really sure why that error would show as it's usually syntax error. Maybe there are blanks in the bigger set?
PIU =
VAR _min =
MIN ( Test_Data[ProgramAdmissions] )
VAR _max =
MAX ( Test_Data[ProgramAdmissions] )
VAR _same =
IF ( ISBLANK ( _min ), FALSE (), _min = _max )
RETURN
IF ( _same, _min, _min + _max )
VAR _min =
MIN ( Test_Data[ProgramAdmissions] )
VAR _max =
MAX ( Test_Data[ProgramAdmissions] )
VAR _same =
IF ( ISBLANK ( _min ), FALSE (), _min = _max )
RETURN
IF ( _same, _min, _min + _max )
- IamTDR5 years agoResponsive Resident
Sorry, I still had the same error. My dataset is large with many accounts and program codes. Maybe thats my issue?