Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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.

Capture.5PNG.PNG

Output is below,

Capture.PNG
My Table
newPNG.PNG
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.
newPNG.PNG
 
 
 
 
1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
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

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-piga-msft
Resident Rockstar
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

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.