Forum Discussion
ruesaint_denis
Helper I
4 years agoIF statement measure
Hi everyone, I can't seem to get this to work, I would like to get a measure what takes the Average PPS from my table, depending on certain conditions. These are the columns I'd li...
- Anonymous4 years ago
Hi ruesaint_denis ,
I create a sample with data from your screenshot to have a test.
Measure:
Measure = VAR _TRUE_AVG = CALCULATE(SUM('Table'[Average PPS]),'Table'[Is Active] = TRUE()) VAR _Active_list = CALCULATETABLE(VALUES('Table'[Is Active]),ALLEXCEPT('Table','Table'[Company Id])) VAR _Status_list = CALCULATETABLE(VALUES('Table'[Company Status]),ALLEXCEPT('Table','Table'[Company Id])) VAR _MAXDATE = CALCULATE(MAX('Table'[Updated At]),FILTER(ALLEXCEPT('Table','Table'[Company Id]),'Table'[Company Status] = "Open")) VAR _OPEN_AVG = CALCULATE(SUM('Table'[Average PPS]),FILTER( ALLEXCEPT('Table','Table'[Company Id]), 'Table'[Updated At] = _MAXDATE)) RETURN IF(TRUE() in _Active_list,_TRUE_AVG, IF("Open" in _Status_list && _OPEN_AVG<>BLANK(),_OPEN_AVG,"Please Check"))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SpartaBI
Community Champion
4 years agoruesaint_denis can you share a sample data in copy paste here and the desired result and logic (in words) for that result (the visual).