Percent of Total Windowed in Power BI DAX

后端 未结 2 934
北荒
北荒 2021-01-21 17:12

I have these two tables:

A data table...

ImaginaryData = 
DATATABLE (
    \"Fruit\", STRING,
    \"Colour\", STRING, 
    \"Amount\", INTEGER, 
    { 
           


        
2条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 17:28

    I used following measure and it works as expected:

    %Total = 
    CALCULATE(DIVIDE(sum(ImaginaryData[Amount]),
    CALCULATE(SUM(ImaginaryData[Amount]),ALLSELECTED(ImaginaryData))))
    

提交回复
热议问题