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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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