Forum Discussion

powerbijourney's avatar
powerbijourney
Regular Visitor
7 years ago

Use percentage measure for multiplication

Hi There,

I have the following DAX that calulates the percentage of the items based on the total

Percentage Of Total Units = DIVIDE(
    [Total Units],
    CALCULATE(
        SUM(table_1[Unit Length]),
        ALLSELECTED(table_1)
    )
)


This works great, and displays percentage per row in a table, however I need to use this percentage per row and multiply this by another value. I tried the following:

Measure = PRODUCTX(
    VALUES(
        table_1[unit_cost/h]
    ), 
    [Percentage Of Total Units]
)

But this does not give me the expected value, its wrong.

 

Is the percentage measure incorrect? Or am I using the wrong functions?

No RepliesBe the first to reply