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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ymirza
Helper II
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.

MonthNameRate
JanAdamTRUE
JanMarkFALSE
JanJaneTRUE
JanJacobFALSE
JanStevenTRUE
JanJonesFALSE
FebAdamTRUE
FebMarkFALSE
FebJaneTRUE
FebJacobFALSE
FebStevenTRUE
FebJonesFALSE
MarAdamTRUE
MarMarkFALSE
MarJaneTRUE
MarJacobFALSE
MarStevenTRUE
MarJonesFALSE

 

1 ACCEPTED SOLUTION

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. 

 
 

2019-12-19_14-07-06.png

What I did using your DAX is created another measure

 
Total % = IF(HASONEVALUE(Sheet1[Month]),[PercMeasure],   AVERAGEX(VALUES(Sheet1[Month]),[PercMeasure]))
 
  2019-12-19_14-16-18.png

View solution in original post

5 REPLIES 5
JarroVGIT
Resident Rockstar
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! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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?

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])))

 

 

count_trueCapture.PNG

 

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

 

count_rate.PNG

 

 

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

 

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?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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. 

 
 

2019-12-19_14-07-06.png

What I did using your DAX is created another measure

 
Total % = IF(HASONEVALUE(Sheet1[Month]),[PercMeasure],   AVERAGEX(VALUES(Sheet1[Month]),[PercMeasure]))
 
  2019-12-19_14-16-18.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.