cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frixel
Post Prodigy
Post Prodigy

Get percentage after filter colom

Hi all,

I'm trying to get in the 3rd table the percentage of the 1st and 2nd table.
Like as; sum from 31/423*100= 7.328

 

How to do that?

 

1.png

1 ACCEPTED SOLUTION

@aj1973 

 

Then i get this 

 

Frixel_2-1625520686651.png

 

 

View solution in original post

21 REPLIES 21
Fowmy
Super User
Super User

@Frixel 

Try this measure, set the Format to Percentage.

%f = 
DIVIDE (
    counta(table[filterd]),
    counta(table[subject])
)

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy 

 

Then i get this error.

Frixel_0-1625429908805.png

 

@Frixel 

 

You need to replace it with your table and column names

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

aj1973
Community Champion
Community Champion

Hi @Frixel 

Are these Added measures or calculated columns?

aj1973_0-1625431805574.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi @Fowmy  & @aj1973

Thanks for your reactions.

 

The first table (count of subject) is from 'Fields'

 

Frixel_0-1625466712225.png

And the table Count filterd is is the same as table 1 but now there is a filter voor specific words in the subject.

So i want to see how much percent of the filterd subject is from all the mail(count of subject) that day.

aj1973
Community Champion
Community Champion

@Frixel 

Did you try to change the name of the tables accordingly in @Fowmy formula like he said?

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 @Fowmy 

 

There is no more error at the moment but i see not the right percentage.

Sorry for my unknownes but this is new for me.

 

Frixel_0-1625490631938.png

 

aj1973
Community Champion
Community Champion

@Frixel 

Not clear how your model looks like but try to add SELECTEDVALUE('Yourtabel'[Column Date]) to calculate the count before you divide both values.

 

%f = 
var _Date = SELECTEDVALUE(yourtabel[datecolumn])
var _CountFiltered = CALCULATE(counta(table[filterd]) , yourtabel[datecolumn] = _Date)
var _CounTtSubject = CALCULATE(counta(table[Subject]) , yourtabel[datecolumn] = _Date)
return
DIVIDE (
    _CountFiltered,
    _CounTtSubject
)

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

i realy don`t know wkat to do but i think like this? But then noting appearts and i have a erros.

 

Frixel_0-1625515553622.png

 

aj1973
Community Champion
Community Champion

@Frixel 

The column Date in your visual where is it coming from ?

aj1973_0-1625515859273.png

In VAR _

_CountFiltered

change the table by the name of your table 

Bottom line, change the name of columns and tables according to your model. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

Hope that this picture make it clear.

 

Frixel_0-1625518585871.png

 

aj1973
Community Champion
Community Champion

@Frixel 

you need to replace "table" by the name of the table where you apply the Counta

aj1973_0-1625518888218.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

i don`t know what the table is for the filtered colomn.(row4)

 

Frixel_0-1625520057452.png

 

aj1973
Community Champion
Community Champion

@Frixel 

replace Subject by filtered

aj1973_0-1625520220533.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

Then i get this 

 

Frixel_2-1625520686651.png

 

 

View solution in original post

aj1973
Community Champion
Community Champion

In one of your visual tables there a column name Count of Filtered...what is it ? Where is it coming from?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

aj1973
Community Champion
Community Champion

@Frixel 

What is the filter applied here??

aj1973_0-1625574728022.png

Can you please share your file in Private?? I sent you a private message.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

Sorry for the long time to wait but i have a short holliday.

I will mail the file to you private but i don`t see the option for a attachemnt.

 

aj1973
Community Champion
Community Champion

Hey you are back lol

 

Use OneDrive , DropBox, GoogleDrive....For your file

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

I send it to you.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.