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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
colourfullife
Post Partisan
Post Partisan

Calculate percentage out of counted number

Hi All,

 

I need help!

 

I have a table as below in my report.

I want to calculate percentage %; delivery progess against count of tag number which is total number.

since they are counted number of tag number and delivery dates. i am not sure how i can make percentage out of them.

 

thank you in advanced.

make percentage.PNG

1 ACCEPTED SOLUTION

Hi,

 

I actually figured out,  tried the solution you provided. It causes error. 

I think since the delivery value is from date type (I mentioned) , Dax sum doesn't work directly..

 

Measure = CALCULATE(COUNTA(IEOVED01[Actual Delivery Date]))/CALCULATE(COUNT(IEOVED01[Tag Number]))
 
KR,
CL
 
 
 

View solution in original post

10 REPLIES 10
JosefPrakljacic
Solution Sage
Solution Sage

Good morning @colourfullife,

 

here is my educated guess

Measure := DIVIDE(SUM(Table[Count of Tag Number]),ALL(Table[Delivered]))

If I was wrong please provide us with some sample data and the expected result.

 

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

sorry it doesn't work

May I ask you to provide some sample-data and an example of the expected result so that I can help you properly.

 

BR,

Josef

There is 2 columns in the picture. Cout of tag number and Delivered. delivery column is a number of counted date.

i want to put a new column showing delivery progress %. so basically i need this calculation in PBI.  delivered/ counted of tag number.

 

is it enough to expain?

 

thanks for your help

No it isn't...

 

Here my next educated guess...

Measure := DIVIDE(DISTINCTCOUNT(Table[TMID]),ALL(Table[Delivered]))

 

Because "is not working" isn't a proper explanation what does that mean "is not working"?

 

  • Adding sample records supports the people who want to help you. If you insert them textually, the person who wants to help you don't have to write it down from a screenshot and can simply copy it.

 

  • Posting the expected result to your sample records, even if it is in Excel, prevents misunderstandings.

 

  • Posting your model leads to Dax code being written that perform better or is atleast working...

 

Therefore, if you expect help from others, it would be very kind of you to do the minimum amount of work in return.

Here you have nice explanation from @Greg_Deckler  

 

BR,

Josef

thanks very much for your educated guess but it doesn't work. it shows an error message as previous.

 

 I said 'it desn't work' . It means the dax that you wrote it down made an error. literally doesn't work in PBI.

 

the column named new coumn is what i want to get.  if it's not enough to explain my situation. please tell me. i can share my native file.

 

Many thanks in advanced.

UnitCount of Tag numberDeliveredNew Column
113323%
211764%
324521%
421419%
51515100%

 

error message that i got when i use the dax you provided.

error.PNG

Hey @colourfullife 

 

Ok here you have the solution and here is the example file

Measure := DIVIDE(SUM('Table'[Delivered]),SUM('Table'[Count of Tag number]))

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

Hi,

 

I actually figured out,  tried the solution you provided. It causes error. 

I think since the delivery value is from date type (I mentioned) , Dax sum doesn't work directly..

 

Measure = CALCULATE(COUNTA(IEOVED01[Actual Delivery Date]))/CALCULATE(COUNT(IEOVED01[Tag Number]))
 
KR,
CL
 
 
 


@colourfullife wrote:

Hi,

 

I actually figured out,  tried the solution you provided. It causes error. 

I think since the delivery value is from date type (I mentioned) , Dax sum doesn't work directly..

 

Sorry I'm pedantic now, but the code works if you use your provided example. (...)

 

And then writing that "you mentioned" it. The last example counts and not a vague phrase in a subordinate clause at the beginning of the thread

 

As GregDeckler describes it, people are here try to help PowerBi enthusiasts on a voluntary basis because they appreciate the community.

 

May I ask you to be more precise in the future. [Sarcasm incoming] You may not believe me, but it makes a lot of sense to post examples at the beginning of a thread and it makes a lot more sense if these examples also meet your requirements.

 

Have nice day @colourfullife and much fun with Power BI

 

BR,

Josef

 

 

@JosefPrakljacic 

Oh..If you think i wasted your time, i am so sorry. BUT I never ever tried to waste other people's precious time as well as mine.

 

Sometimes i feel very hard to communicate here as well since it's not a vebal explanation/ without a native file. but this is how it is and i still do appreciate what it is. This is NO.1 place that i come to ask some help and information of PBI..

 

Maybe my bad this time, i thought my question is pretty simple to ask. i definately will give sample as graph in the future if it needs.

 

Thanks for whatever you trying to give and Have a wonderful day

 

BR,

CL

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.