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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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 ACCEPTED SOLUTION
Post Prodigy

Then i get this

21 REPLIES 21
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
Post Prodigy

Hi @Fowmy

Then i get this error.

Super User

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

Hi @Frixel

Are these Added measures or calculated columns?

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

Post Prodigy

Thanks for your reactions.

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

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.

Community Champion

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

Post Prodigy

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.

Community Champion

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

Post Prodigy

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

Community Champion

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

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

Post Prodigy

Hope that this picture make it clear.

Community Champion

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

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

Post Prodigy

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

Community Champion

replace Subject by filtered

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

Post Prodigy

Then i get this

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

Community Champion

What is the filter applied here??

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

Post Prodigy

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.

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

Post Prodigy

I send it to you.

## Helpful resources

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors