cancel
Showing results 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.

Helper II

## Percentage of False in a column from a Month row

I have table with name, month and rate. What would be the appropriate DAX to measure percentage of False only from that specifc month (not the total column of Rate)?

for e.g. Jan has 6 names and 3 false. should return 50% under Jan.

 Month Name Rate Jan Adam TRUE Jan Mark FALSE Jan Jane TRUE Jan Jacob FALSE Jan Steven TRUE Jan Jones FALSE Feb Adam TRUE Feb Mark FALSE Feb Jane TRUE Feb Jacob FALSE Feb Steven TRUE Feb Jones FALSE Mar Adam TRUE Mar Mark FALSE Mar Jane TRUE Mar Jacob FALSE Mar Steven TRUE Mar Jones FALSE

1 ACCEPTED SOLUTION
Helper II

Some of the months are not covered with TRUE statements, that is why the DAX you shared was effective only at individual row level, but not the Grant total.

What I did using your DAX is created another measure

Total % = IF(HASONEVALUE(Sheet1[Month]),[PercMeasure],   AVERAGEX(VALUES(Sheet1[Month]),[PercMeasure]))

5 REPLIES 5
Resident Rockstar

Create a measure like this:

``PercMeasure: = COUNTROWS(FILTER(Table3, Table3[Rate] = TRUE)) / COUNTROWS(Table3)``

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂

Proud to be a Super User!

Helper II

As a start this is good, I am getting individual measures correct for each month.

but the grand total is calculating on all rows instead of specific rows.

for e.g. if Month of Feb has all False, filter is still using Feb to divide the grant total.

Is there any DAX that only calculates the TRUE from each month and returns grand total based on the TRUE found in those months?

Community Support
Hi @ymirza

First of all, my [rate] column is text data type, and then I create a calculated column:

``````COUNT_TRUE = CALCULATE(
COUNT(Sheet6[Rate]),
FILTER(Sheet6,
Sheet6[Rate]="TRUE"&&
Sheet6[Month]=EARLIER(Sheet6[Month])))``````

The same way to calculate the number of months, you can get the rate of each month.

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Resident Rockstar
I don't understand what you mean. Can you give a self calculated example? I looked at your question again and you asked for measure that would work per month, isn't that what you are looking for?

Proud to be a Super User!

Helper II

Some of the months are not covered with TRUE statements, that is why the DAX you shared was effective only at individual row level, but not the Grant total.

What I did using your DAX is created another measure

Total % = IF(HASONEVALUE(Sheet1[Month]),[PercMeasure],   AVERAGEX(VALUES(Sheet1[Month]),[PercMeasure]))

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors