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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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 11
PC2790
Community Champion
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:
PC2790_0-1629812854970.png

 

ryan_mayu
Super User
Super User

@Anonymous 

could you pls provide some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not 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. 

@Anonymous 

is this what you want?

Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Doc Type]="HP" ||'Table'[Doc Type]="FL"))/COUNTROWS('Table')




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Yeah but I need it to be divided over the amount financed total for all those deals, do i do that in a separate measure

@Anonymous 

i am not familiar to finance staff. could you pls let me the expected output and calculation logic based on your sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

So what i need is to count the number of HPs and Finance lease. Eg = 10 
in those 10 the amount financed totals to 150.

I need to divide the 10 by 150 to show as a percentage

then i will add this to its own table and also to a table with the sales people who have issued out these contracts 

 

 

@Anonymous 

maybe change the countrows to sum(amount)

Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Doc Type]="HP" ||'Table'[Doc Type]="FL"))/sum(amount)

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

okay that seems to work

now if i want to add another part to it which tells me what percentage of the deals are now Operating lease and Contract Hire do i just make a new calculation or add it onto that?

@Anonymous 

maybe try to remove the condition in the filter.

It's better to provide the expected output, not just wording it. Since we don't know your real business. Only providing words may cause misunderstanding.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Greg_Deckler
Community Champion
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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors