Forum Discussion

GGDAC's avatar
GGDAC
Helper I
6 years ago
Solved

Attributes value and mesure

Dear Team

I had belowe table which I did unppivot

DateCountryGross SaleBonusNet SaleCost of SalesGross ProfitCapacity CostDepreciationNet Profit

 

After unpivot I had all values in one column and respecivre key figure name in other column as below

 

DateCountryKey FiguresValue
xxxxGross Sale1000
xxxxBonus10
xxxxNet Sale990
xxxxCost of Sales500
xxxxGross Profit490
xxxxCapacity Cost290
xxxxDepreciation50
xxxxNet Profit150
xxxxxx 

 

Now I want make measures and pick particualr value from the key figures but I don't how to pick particualr key figures from the unpivot column. When I pick it, it gives full column name without specific value option

So let's say I want to calculate Gross profit % which is Gross Profit divide by Gross Sales

I want to know how to pick above two key figures in my measure

Please help

 

  • Hi,

     

    Please try this:

    Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Key Figures]="Gross Profit"))/CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Key Figures]="Gross Sale"))

    The result shows:

     

    Best Regards,

    Giotto Zhi

3 Replies