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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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

 

 

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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