Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

LOOP maybe if statement??? Help please

Hi,

I have this caluatled calumn code below which gives me my sum of specifc index range in a matrix table below.

Output is below,

My Table
What i would like is to carry on the statement like a loop maybe, something like this below.
 
PPH BREAKDOWN =
VAR C = COY[15 Minutes]
VAR M = COY[Index]
RETURN
IF (
M <= 5,
SUMX (
FILTER (
COY, COY[15 Minutes] = C
&& COY[Index]
>= 2
&& COY[Index] >= M
),
AND IF(
M <= 6,
SUMX (
FILTER (
COY, COY[15 Minutes] = C
&& COY[Index]
>= 3
&& COY[Index] >= M
),
COY[Count]
)
)
look something like this below where it gives me totalsfrom multple lines of IF statements.
 
 
 
 
  • Hi Anonymous ,

    If you create the calculated column, it should could achieve your desired output in table visual with Don't Summarize.

    However, we cannot achieve that in matrix with that output because in matrix value field, it will be summarized.

    If you still need help, please share your sample data as table format so that I could copy and have a test on it.

    Best Regards,

    Cherry

     

1 Reply

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    If you create the calculated column, it should could achieve your desired output in table visual with Don't Summarize.

    However, we cannot achieve that in matrix with that output because in matrix value field, it will be summarized.

    If you still need help, please share your sample data as table format so that I could copy and have a test on it.

    Best Regards,

    Cherry