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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Equivalent of SOMMEPROD

 

Hello experts,

 

I want to calculate in the Data table and not in the Report part.

 

In the table given for example, with several arguments (if, or, and, sumprod ...) I arrive at: - For a Subsystem: determine a "Fait" or "RaF" status. - For a System: assemble the state of its subsystems and return "Fait" if they are all done, "Partiel" if only some are done, and finally "RaF" if nothing has been done (via Task, System, Sub System and implementation data)

 

for your translation (partiel = partial / Fait = done / RaF = still to do)

example of what i want :

Exemple Table.png

 

 

Actualy in power bi

 

CharlyExperteam_1-1603357242277.png

 

 

thank !!

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a3.png

 

You may create two calculated columns as below.

Sub Sys Status = 
IF(
    ISBLANK([Date]),
    "RaF",
    "Fait"
)

 

Sys Status = 
var num = 
COUNTROWS(
    FILTER(
        'Table',
        [Travail]=EARLIER('Table'[Travail])&&
        [System]=EARLIER('Table'[System])&&
        NOT(ISBLANK([Date]))
    )
)
var totalnum = 
COUNTROWS(
    FILTER(
        'Table',
        [Travail]=EARLIER('Table'[Travail])&&
        [System]=EARLIER('Table'[System])
    )
)
return
SWITCH(
    TRUE(),
    num=0,"RaF",
    num<totalnum,"Partiel",
    num=totalnum,"Fait"
)

 

Result:

a4.png

 

Best Regards

Allan

 

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-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a3.png

 

You may create two calculated columns as below.

Sub Sys Status = 
IF(
    ISBLANK([Date]),
    "RaF",
    "Fait"
)

 

Sys Status = 
var num = 
COUNTROWS(
    FILTER(
        'Table',
        [Travail]=EARLIER('Table'[Travail])&&
        [System]=EARLIER('Table'[System])&&
        NOT(ISBLANK([Date]))
    )
)
var totalnum = 
COUNTROWS(
    FILTER(
        'Table',
        [Travail]=EARLIER('Table'[Travail])&&
        [System]=EARLIER('Table'[System])
    )
)
return
SWITCH(
    TRUE(),
    num=0,"RaF",
    num<totalnum,"Partiel",
    num=totalnum,"Fait"
)

 

Result:

a4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.