Forum Discussion
dax measure help
Hi,
so I need to create a dax measure which calculates the percentage of deal type for each category.
calculation is
Total number of Hire Purchase + Finance lease / Total amount financed for each category.
Hire purchase and Finance lease are just the values in the deal type column.
Not sure exactly how to format it
11 Replies
- Greg_Deckler
Community Champion
Anonymous Easiest way would be to create your measure:
Measure = Hire Purchase + Finance lease / Total amount
Then right click the measure in the visual's Values field well and choose Show as and then Percent of grand total
- ryan_mayu
Super User
Anonymous
could you pls provide some sample data and expected output?
- AnonymousNot applicable
Doc Type
Amount financed
HP
343
FL
54
HP
3
FL
56
OH
57547
HP
67568
FL
568756
I need to count all the Hire Purchase and all the Finance lease and then divide them by the total amount financed for those deals only.
to give me a percentage of the deals which are that type of lease.- ryan_mayu
Super User
Anonymous
is this what you want?
Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Doc Type]="HP" ||'Table'[Doc Type]="FL"))/COUNTROWS('Table')
- PC2790
Community Champion
Try this:
Column = DIVIDE(MyTable[Amount financed],CALCULATE(SUM(MyTable[Amount financed]),ALLEXCEPT(MyTable,MyTable[Doc Type])))and in Column Tools -->Format section, mark the column as Percentage.The result will look something as below: