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
andrewfayj
Frequent Visitor

Calculate total based upon column conditions

backlog.PNG

I need to calculate the total value based upon the table above. If complexity is equal to low I need to multiply the backlog-complexity count by 25 and if medium the count by 80 and find the sum of these two results.  

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @andrewfayj,

 

Please also try this DAX solution. 

 

Measure =
IF (
    HASONEVALUE ( 'table'[Complexity] ),
    COUNT ( 'table'[Complexity] ),
    SUMX (
        ALL ( 'table'[Complexity] ),
        IF (
            [Complexity] = "Low",
            CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 25,
            CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 80
        )
    )
)

 

Best Regards,

Community Support Team _ Dale
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

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @andrewfayj,

 

Please also try this DAX solution. 

 

Measure =
IF (
    HASONEVALUE ( 'table'[Complexity] ),
    COUNT ( 'table'[Complexity] ),
    SUMX (
        ALL ( 'table'[Complexity] ),
        IF (
            [Complexity] = "Low",
            CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 25,
            CALCULATE ( COUNT ( 'table'[Complexity] ) ) * 80
        )
    )
)

 

Best Regards,

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

Hi,

 

You create a new column in Power Query.
In Add Column Tab -> Conditional Column
if Complexity contains Low then 25
elseif Complexity contails Medium then 80
elseif Complexity.

 

Then create another column, which is multiplication of Blocklog-Complexity-Count * New Column.

 

Use it in the Report.

 

Regards,

Pavan Vanguri.

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.